South Korean President Park Geun-Hye was fired on Friday as a court upheld her impeachment over a corruption scandal that has paralysed the nation at a time of mounting tensions in East Asia.
The unanimous decision brought to a climax months of political turmoil that saw millions of people take to the streets in weekly protests, and triggers a new presidential election to be held within 60 days.
That will offer South Korea a chance to draw a line under the scandal, which has occupied its attention for months, even as the North has unleashed new missile launches and threats that have raised international alarm.
Park, the country's first female president, also becomes its first leader to be removed by impeachment.
She loses her executive immunity from prosecution and is obliged to leave the Blue House -- although she did not do so Friday, with a spokesman saying her private residence still needed to be prepared.
Reading the verdict, constitutional court chief justice Lee Jung-Mi said Park's actions "seriously impaired the spirit of representative democracy and the rule of law".
"President Park Geun-Hye… has been dismissed," she said, sending opponents watching live on giant television screens outside the nation's top court into eruptions of joy.
"We won, we won," they chanted, cheering and hugging each other, some breaking down.
"I am so pleased that I cannot hold back tears," said Shin Seo-Young, 43, clasping her friend. "This is a sweet revenge."
A few hundred metres away, and separated by a huge police presence, a rival protest by the president's flag-waving supporters were stunned.
"We don't accept this decision," said Cho Bong-Am, 60, a kindergarten operator. "We will take to the streets to fight to the end."
Scuffles broke out as the largely older pro-Park crowd tried to drag away buses and break through the police barricades to reach the court.
Police -- more than 20,000 of whom were deployed in the capital -- used pepper spray to try to subdue them and two protestors died, one of them apparently killed when a speaker fell on him from a police vehicle.
- Rule of law -
The court found Park broke the law by allowing her friend Choi Soon-Sil -- who is already on trial for abuse of power -- to meddle in state affairs, and by breaking rules on public servants' activities.
"Park's breaching of the constitution and the laws betrayed the trust of the people," said judge Lee, describing her actions as "a serious and unacceptable violation of the laws".
One of Park's lawyers expressed "strong regrets" over the verdict.
But her own Liberty Korea party apologised, with its interim leader saying it had "failed to protect the dignity and pride of South Korea".
Kwon Seong-Dong, a lawmaker and a member of the parliamentary indictment committee, said the verdict confirmed the rule of law and that "all people including the president are equal in front of the law".
Park, the daughter of a late army-backed dictator, secured the highest vote share of any candidate in the democratic era when she was elected in 2012.
But her aloof style and a series of controversies, coupled with mounting economic and social frustrations, saw her ratings plunge and millions take to the streets to demand her removal.
She was impeached by parliament in December on charges including bribery and abuse of power, and an overwhelming majority of South Koreans -- around 77 percent -- supported her removal in opinion polls.
Park repeatedly apologised for the impact of the scandal, but rejected all allegations of wrongdoing when she submitted a written statement to the court's last hearing in February.
"I've never sought private gains or abused power as president... I plead with the court to make a wise decision," she said.
- 'Witch of Chongwadae' -
South Korea's National Election Commission opened applications for the presidential poll, which is expected to be held on May 9.
The winner will have to try to deal with the troublesome North, which US President Donald Trump has vowed to rein in, and a furious China.
Beijing, angered over America's THAAD missile-defence system which is being rolled out in the South in response to the North's missile threat, has imposed a series of measures seen in Seoul as economic retaliation.
North Korea's official KCNA news agency, which has repeatedly described Park as a "traitor" and "the witch of Chongwadae" (Blue House), reported her dismissal in a brief, factual dispatch.
With thousands of US troops stationed in the South, State Department spokesman Mark Toner said Washington would "continue to meet all our alliance commitments, especially with respect to defending against the threat from North Korea".
The impeachment, he added, was a "domestic issue" and the US had no position on it. "It is up to the Korean people and their democratic institutions to determine the future of their country, and we respect their decisions."
Washington looked forward to a "productive relationship with whomever the people of South Korea elect to be their next president", he said.
The current electoral front-runner is Moon Jae-In, former leader of the opposition Democratic Party, who had the support of 36.1 percent in a Realmeter poll released on Thursday, with conservative acting president Hwang Kyo-Ahn a distant second.