South Korea's Constitutional Court removed President Park Geun-hye from office on Friday over a graft scandal involving the country's conglomerates at a time of rising tensions with North Korea and China.
The ruling sparked protests from hundreds of Park's supporters, two of whom were killed in clashes with police outside the court, and a festive rally by those who had demanded her ouster who celebrated justice being served.
"We did it. We the citizens, the sovereign of this country, opened a new chapter in history," Lee Tae-ho, the leader of a movement to oust Park that has held mostly peaceful rallies in downtown involving millions, told a large gathering in Seoul.
Park becomes South Korea's first democratically elected leader to be forced from office, capping months of paralysis and turmoil over the corruption scandal that also landed the head of the Samsung conglomerate in detention and on trial.
A snap presidential election will be held within 60 days.
Park did not appear in court, and a spokesman said she would not be making any comment. She also would not leave the presidential Blue House residence on Friday.
"Park is not leaving the Blue House today," Blue House spokesman Kim Dong Jo told Reuters.
Park was stripped of her powers after parliament voted to impeach her but has remained in the president's official compound.
The court's acting chief judge, Lee Jung-mi, said Park had violated the constitution and law "throughout her term," and despite the objections of parliament and the media, she had concealed the truth and cracked down on critics.
Park has steadfastly denied any wrongdoing.
The ruling to uphold parliament's Dec. 9 vote to impeach her marks a dramatic fall from grace of South Korea's first woman president and daughter of Cold War military dictator Park Chung-hee. Both her parents were assassinated.
Park, 65, no longer has immunity and could now face criminal charges over bribery, extortion and abuse of power in connection with allegations of conspiring with her friend, Choi Soon-sil.
Prime Minister Hwang Kyo-ahn was appointed acting president and will remain in that post until the election. He called on Park's supporters and opponents to put their differences aside to prevent deeper division.
"It is time to accept, and close the conflict and confrontation we have suffered," Hwang said in a televised speech.
A liberal presidential candidate, Moon Jae-in, is leading in opinion polls to succeed Park, with 32 percent support in one poll released on Friday. Hwang, who has not said whether he will seek the presidency, leads among conservatives, none of whom has more than single-digit poll ratings.
"Given Park's spectacular demise and disarray among conservatives, the presidential contest in May is the liberals' to lose," said Yonsei University professor John Delury.
Relations with China and the United States could dominate the coming presidential campaign, after the U.S. military this month started deploying the U.S. THAAD missile defense system in South Korea in response to North Korea's stepped-up missile and nuclear tests.
Beijing has vigorously protested against the deployment, which was agreed last year between Washington and Seoul, fearing its radar could see into its missile deployments. China has curbed travel to South Korea and targeted Korean companies operating in the mainland, prompting retaliatory measures from Seoul.
The U.S. military said on Friday it would keep delivering THAAD components, separating the issue from South Korea's internal political crisis. The new U.S. administration has been keen to install the system as quickly as possible due to concerns that a new government in Seoul could block the deployment.
"We have a strong relationship and will continue to work with South Korea," White House spokesman Sean Spicer said. "It's a domestic issue in which the United States takes no position in the outcome of that election."
The prospect of a new president in the first half of this year instead of prolonged uncertainty would buoy domestic demand as well as the markets, said Trinh Nguyen, senior economist at Natixis in Hong Kong.
"The hope is that this will allow the country to have a new leader that can address long-standing challenges such as labor market reforms and escalated geopolitical tensions," he said.
Park was accused of colluding with her friend Choi and a former presidential aide, both of whom have been on trial, to pressure big businesses to donate to two foundations set up to back her policy initiatives.
The court said Park had "completely hidden the fact of (Choi's) interference with state affairs."
Park was also accused of soliciting bribes from the head of the Samsung Group for government favors, including backing a merger of two Samsung affiliates in 2015 that was seen as supporting family succession and control over the country's largest "chaebol," or conglomerate.
Samsung Group leader Jay Y. Lee has been accused of bribery and embezzlement in connection with the scandal and is in detention. His trial began on Thursday.
He and Samsung have denied wrongdoing.
The scandal and verdict have exposed fault lines in a country long divided by Cold War politics.
While Park's conservative supporters clashed with police outside the court, elsewhere most people welcomed her ouster. A recent poll showed more than 70 percent supported her impeachment.
Hundreds of thousands of people have for months been gathering at peaceful rallies in Seoul every weekend to call for Park to step down.
On Friday, hundreds of Park's supporters, many of them elderly, tried to break through police barricades at the courthouse. Police said one 72-year-old man was taken to hospital with a head injury and died. The circumstances of the second death were being investigated.
Six people were injured, protest organizers said.
Police blocked the main thoroughfare running through downtown Seoul in anticipation of bigger protests.
Park will be making a tragic and untimely departure from the Blue House for the second time in her life.
In 1979, having served as acting first lady after her mother was killed by a bullet meant for her father, she and her two siblings left the presidential compound after their father was killed.
This time, she could end up in jail.
Prosecutors have named Park as an accomplice in two court cases linked to the scandal, suggesting she is likely to be investigated.
North Korean state media wasted little time labeling Park a criminal.
"She had one more year left as 'president' but, now she's been ousted, she will be investigated as a common criminal," the North's state KCNA news agency said shortly after the court decision.