SEOUL—South Korea’s legislature impeached President Yoon Suk Yeol over his decision to briefly institute martial law, kick-starting a monthslong process to potentially select a new leader following one of the nation’s most tumultuous chapters in recent years.

Needing a two-thirds majority, lawmakers voted 204 to 85 to impeach Yoon, who will immediately be stripped of his presidential powers. Three abstained, while eight cast invalid votes. A vote last weekend to impeach the conservative president failed. The country’s prime minister, Han Duck-soo, a Harvard-educated former ambassador to the U.S., will serve as acting president in the interim.

Yoon, about halfway through a five-year term ending in 2027, won’t be removed from office until South Korea’s constitutional court reviews and certifies the impeachment vote. The court has up to six months to do so, though it has ruled far more quickly than that on impeachment cases before. If upheld, a snap election would occur within 60 days.

The clear front-runner in a snap election is Lee Jae-myung, Yoon’s archnemesis and head of the left-leaning Democratic Party who led the push to impeach the president. One recent poll put Lee’s support at 52%, with the top conservative at about 10%. Lee would bring a different flavor to South Korea’s foreign policy: He would seek engagement with North Korea, more independence from the U.S., balance with China and a tougher line with Japan.

After Yoon took office in 2022, Seoul revived diplomacy with Tokyo, established deeper ties with the Biden administration and created unprecedented military coordination between the U.S., Japan and South Korea—such as last year’s move knitting together their missile-radar systems for the first time. Yoon has also taken a confrontational stance with the regime of North Korean leader Kim Jong Un, arguing peace is achieved through strength.

A week ago, lawmakers from Yoon’s ruling People Power Party walked out before an impeachment vote could take place, leaving the opposition shy of a 200-vote quorum. Since then, pressure mounted on Yoon, who had become increasingly defiant, vowing to “fight until the end” in a prerecorded Thursday address. But this Saturday, enough members of Yoon’s own party supported the opposition’s motion to impeach him.

Yoon said he had made his martial-law decree on Dec. 3 out of desperation and to alert the public to a “disastrous crisis” unfolding in the country. He also accused the opposition of political chicanery, from blocking legislation to impeaching top officials. He accused his political enemies of making South Korea vulnerable to North Korean “communist forces.”

More than 90% of South Koreans wanted to see Yoon removed, according to polling released days before Saturday’s vote. According to a poll released Friday, Yoon’s approval plummeted to a new low of 11%.

Yoon becomes the third South Korea president to be impeached. The first instance occurred in 2004 with Roh Moo-hyun, who was accused of a relatively minor violation of election law. The court took two months to rule that the offense wasn’t sufficient to remove him from office and reinstated him. In December 2016, Park Geun-hye was impeached over an influence-peddling scandal, which the court upheld after roughly three months.

Compared with the Park case, the legal basis for impeaching Yoon appears to be more straightforward. Moreover, some sitting judges are set to vacate after their terms end next April, so a decision is likely to come by mid-March, said Lee Jong-soo, of Yonsei University in Seoul, who specializes in South Korean constitutional law.

The timing isn’t inconsequential. Lee Jae-myung, the opposition head, has five ongoing trials, from allegations of election-law violations to perjury to breach of duty, and if convicted would be barred from running for office for up to 10 years.

The political chaos has caused South Korea ’s major stock markets to fall, the local currency to weaken against the U.S. dollar, and diplomacy to grind to a halt.

South Korea, a close U.S. ally, shed military rule in the late 1980s, with citizens taking great pride in their hard-fought transition to democracy. Yoon’s abrupt decision to impose martial law , which would have allowed him to exert control over the media, health services and political realms, shocked the nation, including some senior figures inside his government. It also surprised the Biden administration, which admitted it hadn’t known of Yoon’s plans in advance.

Yoon’s impeachment will cool simmering public anger and remove some questions over who is running the country. On Sunday, the leader of the People Power Party said Yoon would no longer be involved in running the country or diplomacy; instead, the party and Han, the prime minister, would handle “livelihood issues and state affairs.” The opposition slammed this arrangement as unconstitutional.

The potential risk of a leadership vacuum remains over the martial-law decree. Various criminal probes are under way against Yoon and top cabinet members, including Han, who has said he would cooperate with investigators. If Han is indicted, Deputy Prime Minister Choi Sang-mok, who is also the country’s minister of economy and finance, would be next up to serve as acting president.

Questioned in front of lawmakers on Wednesday, the 75-year-old Han said South Korea’s state council, including himself, opposed Yoon’s martial-law declaration. However, Han added, they failed to stop him.