SEOUL: South Korean President Yoon Suk Yeol declared martial law late Tuesday, vowing to eliminate "anti-state” forces as he struggles against an opposition that controls the country’s parliament and that he accuses of sympathizing with communist North Korea.

Hours later, parliament voted to lift the declaration, with National Assembly Speaker Woo Won Shik declaring that the martial law was "invalid” and that lawmakers "will protect democracy with the people.”

Police and military personnel were seen leaving the Assembly’s grounds after Woo called for their withdrawal. Lee Jae-myung, leader of the liberal Democratic Party, which holds the majority in the 300-seat parliament, said the party’s lawmakers will remain in the Assembly’s main hall until Yoon formally lifts his order.

Seemingly hundreds of protesters gathered in front of the Assembly, waving banners and calling for Yoon’s impeachment.

"Democratic Party lawmakers, including me and many others, will protect our country’s democracy and future and public safety, lives and properties, with our own lives,” Lee told a televised news conference.

The president’s surprising move harkened back to an era of authoritarian leaders that the country has not seen since the 1980s, and it was immediately denounced by the opposition and the leader of Yoon’s own conservative party.

Following Yoon’s announcement, South Korea’s military proclaimed that parliament and other political gatherings that could cause "social confusion” would be suspended, according to South Korea’s Yonhap news agency.

The military also said that the country’s striking doctors should return to work within 48 hours, Yonhap said. Thousands of doctors have been striking for months over government plans to expand the number of students at medical schools. The military said anyone who violates the decree could be arrested without a warrant.