South Korea's parliament has voted to impeach President Yoon Suk Yeol over his declaration of martial law earlier this month.
All 300 members of parliament participated in the vote, in stark contrast to a vote last week that was boycotted by the ruling party.
The vote needed 200 votes to succeed. It got 204, with members of Mr Yoon's own party joining the opposition to pass the motion.
The opposition parties control 192 of the 300 seats in the single-chamber parliament so they needed at least eight opposition votes to reach the threshold for impeachment.
Eighty-five voted against and three abstained, with eight votes nullified.
In a televised address after the vote, Mr Yoon said he would "step aside" but also vowed he "will not give up" and would do his best until the last minute for the country.
"I am frustrated all the efforts so far will be in vain," he said in televised remarks.
"Although I am stopping for now, the journey I have walked with the people over the past two and a half years toward the future must never come to a halt."
South Korea's ruling party leader Han Dong-hoon said he took the result seriously, but would not heed calls to also step down.
Han Duck-soo stepping in as interim president
Mr Yoon is now suspended from office while South Korea's Constitutional Court deliberates whether to uphold his removal.
The court has 180 days to rule on Mr Yoon's future.
Following the vote, parliament speaker Woo Won-shik said the assembly would seek to nominate three more judges to the court as soon as possible.
"The future of South Korea lies within its people," he said.
If it backs his removal, Mr Yoon would become the second president in South Korean history to be successfully impeached. Park Geun-hye was removed from office in 2017.
Han Duck-soo, who was appointed prime minister by Mr Yoon in May 2022, will step in as interim president.
Mr Han told reporters after the vote his "heart is very heavy", but he would "give all my strength" to run the government stably following his successor's impeachment.
If Mr Yoon is removed, a national election to choose his successor must be held within 60 days.
"Today's impeachment is the great victory of the people," opposition Democratic Party floor leader Park Chan-dae said following the vote.
Opposition Democratic Party leader Lee Jae-myung told protesters near parliament that they should fight together so Mr Yoon was removed as quickly as possible.
"You, the people, made it. You are writing a new history," he told the jubilant crowds, who had braved sub-freezing temperatures to attend the rally.
A Seoul police official said at least 200,000 people had massed outside parliament in support of removing the president ahead of the poll.
On the other side of Seoul, near Gwanghwamun square, police estimated 30,000 rallied in support of Mr Yoon.
Yoon facing criminal investigation, travel ban
Last Saturday, Mr Yoon survived an impeachment vote after most ruling party MPs boycotted the floor vote.
Some of his own party members had since announced their intention to vote for his impeachment in a second vote, as public protests against Mr Yoon intensified and his approval rating plummeted.
The impeachment motion alleged that Mr Yoon "committed rebellion that hurts peace on the Republic of Korea by staging a series of riots".
It said Mr Yoon's mobilisation of military and police forces threatened the National Assembly and the public and that his martial law decree was aimed at disturbing the constitution.
Mr Yoon's martial law imposition — the first of its kind in more than four decades in South Korea — lasted only six hours. However, it has caused massive political tumult, halted diplomatic activities and rattled financial markets.
During the imposition, the president gave the military sweeping emergency powers in order to root out what he called "anti-state forces" and overcome obstructionist political opponents.
Mr Yoon was forced to lift his decree after parliament unanimously voted to overturn it.
He later apologised to the nation but also defended his decision, resisted calls to resign and tried to impede the first impeachment vote by sending hundreds of troops and police officers to parliament — but they withdrew after it failed.
South Korea's acting defence minister Kim Seon-ho ordered the military's commanding officers to stabilise their forces and maintain their preparedness after the second vote passed, the ministry said in a statement.
Mr Yoon is separately under criminal investigation for alleged insurrection over the martial law declaration and authorities have banned him from travelling overseas.
If convicted, the leader of a rebellion plot can face the death penalty or life imprisonment.
Mr Yoon's defence minister, police chief and the head of Seoul's metropolitan police agency have been arrested over their roles in the martial law case. Other senior military and government officials also face investigations.
ABC/wires