South Koreans were shocked when President Yoon Suk Yeol said in an unannounced live TV broadcast that he was declaring martial law - then reversed course just hours later.
After initial confusion over exactly what measures would be taken, the South Korean military released a decree banning protests and activity by parliament and political parties, and placing media under government control.
Few of those steps appeared to have been implemented before 190 of the National Assembly's 300 members defied police and military cordons to vote against the declaration, which Yoon then promised to lift.
Here is what we know so far:
Why did Yoon declare martial law?
Yoon said opposition parties had taken the parliamentary process hostage.
"I declare martial law to protect the free Republic of Korea from the threat of North Korean communist forces, to eradicate the despicable pro-North Korean anti-state forces that are plundering the freedom and happiness of our people, and to protect the free constitutional order," Yoon said.
Yoon did not cite any specific threat from the nuclear-armed North, instead focusing on his domestic political opponents.
He complained of 22 impeachment motions filed against administration officials since he took office in May 2022.
The president's approval ratings have hovered near record lows amid a burgeoning influence peddling scandal and clashes with the opposition-controlled parliament over budgets and investigations.
Read more:
What steps did the military take?
The military named Army Chief of Staff General Park An-su, a four-star general, to head a martial law command and released the decree effective at 11pm Tuesday local time.
Besides banning political activity and restricting the media, the decree also ordered striking doctors back to work.
Those who violate martial law could be arrested without a warrant, it said.
Masked martial law troops equipped with rifles, body armour and night-vision equipment entered the National Assembly where they faced off with staffers who opposed them with fire extinguishers.
As of early Wednesday there was no outward sign of government control of media outlets, which continued to report throughout the crisis.
What was the response?
Thousands of demonstrators gathered outside the parliament where there were minor clashes with police and military.
Lawmakers gathered to vote against martial law, as both opposition lawmakers and leaders of Yoon's own party decried it as unconstitutional.
All 190 of the lawmakers present voted to lift martial law. Yoon gave another address announcing that troops had been pulled back and that he would lift the decree after convening a cabinet meeting as soon as possible.
Some foreign embassies in Seoul warned their citizens to take caution.
Officials in the United States, Britain, Germany, and elsewhere said they were concerned about the developments and said peaceful rule of law should prevail.
- Reuters