Why was martial law declared in South Korea?

Why was martial law declared in South Korea?

South Korean President Yoon Suk Yeol has lifted martial law, which he implemented hours earlier in a move that shocked MPs, the public and international allies.