South Korean lawmakers on Friday impeached President Park Geun-hye, a stunning and swift fall for the country's first female leader amid protests that drew millions into the streets in united fury.

After the vote, parliamentary officials hand-delivered formal documents to the presidential Blue House that stripped Park of her power and allowed the country's No. 2 official, Prime Minister Hwang Kyo-ahn, to assume leadership until the Constitutional Court rules on whether Park must permanently step down. The court has up to six months to decide.

"I'd like to say that I'm deeply sorry to the people because the nation has to experience this turmoil because of my negligence and lack of virtue at a time when our security and economy both face difficulties," Park said after the vote, before a closed-door meeting with her Cabinet where she and other aides reportedly broke down in tears.

Hwang separately said that he wanted "the ruling and opposition political parties and the parliament to gather strength and wisdom so that we can return stability to the country and people as soon as possible."

Once called the "Queen of Elections" for her ability to pull off wins for her party, Park has been surrounded in the Blue House in recent weeks by millions of South Koreans who have taken to the streets in protest. They are furious over what prosecutors say was collusion by Park with a longtime friend to extort money from companies and to give that confidante extraordinary sway over government decisions.

Organizers said about 10,000 people gathered in front of the National Assembly to demand that lawmakers pass the impeachment motion. Some had spent the night on the streets after traveling from other cities. Scuffles broke out between angry anti-Park farmers, some of whom had driven tractors to the assembly from their farms, and police. When impeachment happened, many of those gathered raised their hands in the air and leapt about, cheering and laughing.

"Can you hear the roar of the people in front of the National Assembly?" Kim Kwan-young, an opposition lawmaker said ahead of the vote, referring to South Korea's formal name. "Our great people have already opened the way. Let's make it so we can stand honorably in front of history and our descendants."

The handover of power prompted the prime minister to order South Korea's defense minister to put the military on a state of heightened readiness to brace for any potential provocation by North Korea. No suspicious movements by the North were reported, however.

Park will be formally removed from office if at least six of the Constitutional Court's nine justices support her impeachment, and the country would then hold a presidential election within 60 days.

National Assembly speaker Chung Sye-kyun said the bill on Park's impeachment was passed by a vote of 234 for and 56 opposed, with seven invalid votes and two abstentions. That well surpassed the necessary two-thirds vote needed in the 300-seat assembly, with the opposition getting strong support from members of Park's party.

Present for the vote were relatives of the victims of a 2014 ferry disaster that killed more than 300 and was blamed in part on government incompetence and corruption; they cheered and clapped after the impeachment was announced. Most lawmakers left the hall quietly, though some could be seen taking selfies as they waited to vote.

Lawmakers from both parties faced huge pressure to act against Park, the daughter of a military dictator still revered by many conservatives for lifting the country from poverty in the 1960s and 1970s.

Her approval ratings had plunged to 4 percent, the lowest among South Korean leaders since democracy came in the late 1980s, and even elderly conservatives who once made up her political base have distanced themselves from her. An opinion survey released earlier Friday showed 81 percent of respondents supported Park's impeachment.

South Korean lawmakers last voted to impeach a president in 2004, when they accused late liberal President Roh Moo-hyun of minor election law violations and incompetence. The Constitutional Court restored Roh's powers about two months later, ruling that his wrongdoings weren't serious enough to justify his unseating.

The chances of the court reinstating Park are considered low because her charges are much graver. Some legal experts say the court might need more than a couple of months to decide. This is because Park's case is much more complicated than Roh's, and because her lawyers will likely press the court not to uphold the impeachment unless the suspicions against her are proven.

Hundreds gathered Friday night at a boulevard in front of an old palace gate in downtown Seoul, which has been the center of demonstrations in recent weeks calling for Park's removal. Protesters planned to march close to the Blue House.

The impeachment is a remarkable fall for Park, who convincingly beat her liberal opponent in 2012. Park's single, five-year term was originally set to end Feb. 24, 2018.

The political turmoil around Park comes after years of frustration over a leadership style that inspired comparisons to her father, Park Chung-hee. Critics saw in Park an unwillingness to tolerate dissent as her government cracked down on press freedom, pushed to dissolve a leftist party and allowed aggressive police suppression of anti-government protests, which saw the death of an activist in 2016.

She also was heavily criticized over her government's handling of the 2014 ferry sinking; most of those victims were school kids.

Park has repeatedly apologized over the public anger caused by the latest scandal, but has denied any legal wrongdoing. She attempted to avoid impeachment last month by making a conditional offer to step down if parliament could come up with a stable power-transfer plan, but the overture was dismissed by opposition lawmakers as a stalling ploy.

In indicting Park's longtime friend, Choi Soon-sil, and two former presidential aides last month, state prosecutors said they believed the president was "collusively involved" in criminal activities by the suspects. Choi and the two former aides were accused of bullying large companies into providing tens of millions of dollars and favors to foundations and businesses Choi controlled, and enabling Choi to interfere with state affairs.

Park's lawyer has called the accusations groundless.

Park first met Choi in the 1970s, around the time Park was acting as first lady after her mother was killed during a 1974 assassination attempt on her father. Choi's father, a shadowy figure named Choi Tae-min who was a Buddhist monk, a religious cult leader and a Christian pastor at different times, emerged as Park's mentor.

The Choi clan has long been suspected of building a fortune by using their connections with Park to extort companies and government organizations. Choi's ex-husband is also a former close aide of Park's.