South Korea's President Yoon Suk Yeol said on Wednesday he would lift martial law, just hours after imposing it in a bid to quell what he called "anti-state forces."
Yoon backed down after lawmakers voted to oppose the unexpected declaration, which caught even South Korea's closest allies around the world off guard.
Earlier the National Assembly was sealed and troops entered the building for a short time, while hundreds of protesters gathered outside and faced off with security forces.
"Just a moment ago, there was a demand from the National Assembly to lift the state of emergency, and we have withdrawn the military that was deployed for martial law operations," Yoon said in a televised address around 4:30 am (1930 GMT Tuesday).
"We will accept the National Assembly's request and lift the martial law through the Cabinet meeting."
Yonhap news agency reported that Yoon's cabinet approved the motion to lift the order.
The U-turn prompted jubilation among protesters outside parliament who had braved freezing temperatures to keep vigil through the night in defiance of Yoon's martial law order.
Demonstrators waving banners and South Korean flags and chanting "Arrest Yoon Sul Yeol" outside the National Assembly erupted in cheers.
Lim Myeong-pan, 55, said that Yoon's decision to rescind martial law did not absolve him of wrongdoing.
"Yoon's act of imposing it in the first place without legitimate cause is a serious crime in itself," said Lim.
"He has paved his own path to impeachment with this."
Some 190 lawmakers had managed to get into the assembly in the early hours of Wednesday, where they unanimously voted in favour of a motion to block the martial law declaration and call for its lifting.
Under the constitution, martial law must be lifted when a majority in parliament demands it.
Yoon had given a range of reasons to justify martial law – South Korea's first in more than 40 years.
"To safeguard a liberal South Korea from the threats posed by North Korea's communist forces and to eliminate anti-state elements plundering people's freedom and happiness, I hereby declare emergency martial law," Yoon said in a live televised address late on Tuesday night.
Yoon did not give details of the North's threats, but the South remains technically at war with nuclear-armed Pyongyang.
"Our National Assembly has become a haven for criminals, a den of legislative dictatorship that seeks to paralyse the judicial and administrative systems and overturn our liberal democratic order," Yoon said.
Yoon described the imposition of martial law as "inevitable to guarantee the continuity of a liberal South Korea," adding that it would not impact the country's foreign policy.
He described the current situation as South Korea "on the verge of collapse, with the National Assembly acting as a monster intent on bringing down liberal democracy." (AFP)