South Korea's constitutional court has dismissed the impeachment of Prime Minister Han Duck-soo, reinstating him as the country's acting president.
Han took over as acting leader last December when President Yoon Suk Yeol was suspended from duties and impeached by parliament after he attempted to declare martial law.
However, Han only lasted two weeks in power before lawmakers voted to impeach him as well. Since then, South Korea has been led by deputy prime minister Choi Sang-mok.
South Korea has been roiled by political chaos since Yoon's botched attempt to impose martial law.
Shortly after assuming the role of acting president, Han blocked the appointment of new judges to the constitutional court - something the opposition had hoped would improve the odds of Yoon getting impeached.
As a result, they voted to impeach Han.
But on Monday, the judges ruled seven to one to strike down the impeachment.
"I thank the constitutional court for its wise decision," Han said after the ruling was announced. "I will work to bring the government to order."
South Korea remains on tenterhooks for another upcoming decision by the same court - on the impeachment of President Yoon.
Lawmakers voted to impeach Yoon on 14 December, but it is ultimately up to the constitutional court to decide.
If the court votes to uphold the impeachment, Yoon would be immediately removed from office and South Korea must hold a presidential election within 60 days. If it dismisses the impeachment, Yoon would return to his duties immediately.
The court date has not yet been set for the Yoon verdict, but in recent weeks Seoul has seen swelling protests from Yoon's supporters and opponents, with hundreds of thousands taking to the streets of the nation's capital last weekend.
Political analyst Leif-Eric Easley said the dismissal of Han's impeachment shows that the constitutional court "wants to appear impartial, upholding the law and encouraging national stability during a messy political transition".
It "serves to admonish progressive parties for their overzealousness in impeaching government officials", said Dr Easley. He noted that opposition lawmakers have filed several impeachment motions, and the court has dismissed the nine cases it has ruled on so far.
"Reinstating Han is also partly political theatre setting up its more consequential ruling on Yoon's impeachment." Dr Easley added.
"Mostly siding with conservatives on Han's case can be seen as a play for unity and legitimacy" for when the court votes on Yoon's fate in coming days, he said.