South Korea's top court has unaniminously ruled to formally end impeached Park Geun-hye's presidency over a corruption scandal that has plunged the country into political turmoil.

The Constitutional Court's ruling on Friday sparked violent protests from Park's supporters, two of whom later succumbed to their wounds following clashes with police outside the building in downtown Seoul, according to authorities.

Dozens of protesters and police officers were also wounded in the scuffles.

In contrast, tens of thousands of South Koreans occupied a square in front of an old palace in the capital to celebrate Park's ousting.

The ruling opens Park, who no longer has immunity as a president, up to possible criminal proceedings - prosecutors have already named her a criminal suspect.

REPORTER'S NOTEBOOK: The day Park Geun-hye was ousted

It also marks the first time a South Korean president has been ousted before the end of their term since democracy replaced dictatorship in the late 1980s.

Election law now requires a snap poll to be held within 60 days.

Park, 65, has been accused of colluding with a friend, Choi Soon-sil, 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.

AL JAZEERA'S ROB MCBRIDE, IN SEOUL: On the upcoming election: It opens up all sorts of interesting prospects and possibilities. We have had in Park a second conservative president, and nearly 10 years of a conservative occupant of the Blue House. There is now a real feeling amongst many of the people who called for her impeachment, this younger generation engaged in politics that we’ve seen come out that they could be providing a kind of momentum that might see a liberal being elected to the president of South Korea. That could alter the whole geopolitical make-up of this part of the world, in particular the relationship with North Korea, and this scares many pro-Park people, many of the hawkish, more conservative people here who worry that any type of trying to opening up dialogue with North Korea is counterproductive in the carrot and stick approach - what they advocate is basically the stick with North Korea and to be tough with them. On North Korea's reaction: In North Korea the court's ruling has not gone unnoticed. It has been announced on the evening newscast that Park - with some relish it has to be said -is to be dumped out of office and according to North Korean television could well be treated no better than a common criminal in court.

She is also accused of soliciting bribes from the head of the Samsung Group for government favours including the backing of a merger of two Samsung affiliates in 2015 that was seen to support the succession of control over the country's largest "chaebol" conglomerate.

Park has denied any wrongdoing, but apologised for putting trust in her friend.

Park's action had "seriously impaired the spirit of ... democracy and the rule of law," said constitutional court chief justice Lee Jung-Mi. "President Park Geun-hye ... has been dismissed."

Prosecutors have arrested and indicted a slew of high-profile figures over the scandal, including Park's confidante Choi Soon-sil, top Park administration officials and Samsung heir Lee Jae-yong.

But Park has avoided a direct investigation thanks to a law that gives a sitting president immunity from prosecution for most of alleged crimes.

Since she's now no longer in power, prosecutors can summon, question and possibly arrest her.

Park will not vacate the official residence of the president of South Korea, the Blue House, on Friday as her aides are preparing for her return to her private home in southern Seoul.

She was not planning any statement on Friday, the Blue House said.

"That's been one of the uncertainties today because we are in unchartered territory," Al Jazeera's Rob McBride, reporting from Seoul, said.

"It was thought in one stage that the ruling would mean she would have to leave immediately but that doesn’t seem to be the case. She is there for this evening and we expect her to leave sometime over the weekend."

Park's parliamentary impeachment in December came after weeks of Saturday rallies that drew millions who wanted her resignation.

Overwhelmed by the biggest rallies in decades, the voices of Park supporters were largely ignored. But they have recently regrouped and staged fierce pro-Park rallies.

In anticipation of the ruling, Park supporters, many of them dressed in army-style fatigues and wearing red berets, and those who want Park gone began showing up around the Constitutional Court building.

A big television screen was set up near the court so that people could watch the verdict live. Hundreds of police also began preparing for the protests, putting on helmets with visors and black, hard plastic breastplates and shin guards.

Some of Park's supporters reacted with anger after the ruling, shouting and hitting police officers and reporters with plastic flag poles and steel ladders, and climbing on police buses. Anti-Park protesters celebrated by marching in the streets near the Blue House, carrying flags, signs and an effigy of Park dressed in prison clothes and tied up with rope.

The Seoul Metropolitan Police Agency said two people died while protesting Park's removal. An official from the Seoul National University Hospital said that a man in his 70s, believed to be a Park supporter, died from head wounds after falling from the top of a police bus.

READ MORE: The fall of President Park Geun-hye - A day-by-day look

An official from the Kangbuk Samsung Hospital in Seoul said another man brought from the pro-Park rally died shortly after receiving CPR at the hospital. The hospital official could not immediately confirm the cause of death.

Prime Minister Hwang Kyo-ahn has led the government as acting leader since Park's impeachment and he will continue to do so until South Korea elects a new president by May.

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 on Friday.

People on both sides had previously threatened not to accept a Constitutional Court decision.

One of Park's lawyers told the court last month that there will be "a rebellion and blood will drench the asphalt" if Park is booted from office.

READ MORE: Profile: South Korea's Park Geun-hye

Park's critics want to see her appear on TV while dressed in prison garb, handcuffed and bound like others involved in the scandal. But some analysts worry that could create a backlash by conservatives.

Jean Lee, a journalist and global fellow at the Woodrow Wilson Center’s Korea centre, told Al Jazeera there is a sense of fear among Park supporters that this decision will be a security threat.

"There is a lot of fear by the older generation, the old guard. There's fear it's made [the country] more vulnerable," Lee said.

Even after the election, imprisoning Park could still be a burden for a new government, which must pursue national unity to overcome security, economic and other problems, said Chung Jin-young, a professor at Kyung Hee University. Others say it will not be difficult.

Liberal Moon Jae-in, who lost to Park in the 2012 election, currently enjoys a comfortable lead in opinion surveys.

Pre-verdict surveys showed that 70 to 80 percent of South Koreans wanted the court to approve Park's impeachment. But there have been worries that Park's ouster would further polarise the country and cause violence.