SEOUL: When South Korean President Yoon Suk-Yeol declared martial law, lawmakers from the main opposition party raced special forces soldiers to the parliament building to hold a vote against the measures.

Now the same politicians who climbed the compound's walls on Tuesday to avoid security cordons are spearheading an effort to impeach and investigate Yoon and his top ministers over the martial law bid.

Lee Jae-myung, 60, head of the main opposition Democratic Party (DP), narrowly lost the 2022 presidential vote to Yoon and has since gone on to have an acrimonious relationship with the president.

On Tuesday Lee and National Assembly Speaker Woo Won-shik, 67, were among lawmakers who scaled fences after masked soldiers tried to block entry to parliament following a defence ministry decree banning activity by parliament and political parties.

Lee livestreamed his exploit, urging viewers to come to the parliament building and demonstrate to prevent the arrest of lawmakers.

"It’s up to our citizens to protect this country," he said. "We will also risk our lives to protect the democracy of this country."

Shortly before midnight Woo, a former DP member who is technically independent under the rules governing the speaker's role, convened a session with 190 members of the 300-strong parliament who had gathered.

Ten minutes later they voted unanimously to oppose the martial law declaration, and at 4:30 a.m. Yoon relented and said he would lift the state of martial law.

On Saturday Lee's party plans to hold a vote on a motion to impeach Yoon, and has asked prosecutors to investigate the president and key ministers for their role in the matter.

If Yoon is forced from office, Lee is seen as a top contender in the snap election that would be called.

A populist outsider and former governor of the most populous province in South Korea, Lee has been beset by his own legal troubles and scandals.

On November 15, a court convicted Lee of violating the election law, handing him a one-year prison term suspended for two years, a penalty that if upheld could jeopardise his bid to run for president. Lee said he would appeal.

Ten days later he was cleared of another charge of having forced a witness to commit perjury, but still faces several other trials on matters ranging from bribery to charges mostly tied to a $1-billion property development scandal.