SEOUL, South Korea — Yoon Suk Yeol, a conservative former top prosecutor and foreign policy neophyte, was elected South Korea’s president in a win expected to herald a drive to seek a stronger alliance with the United States and take a tougher line on North Korea.

With over 99% of the votes counted early Thursday, Yoon from the main opposition People Power Party had 48.6% against ruling liberal Democratic Party candidate Lee Jae-myung’s 47.8%. It was South Korea’s most closely fought presidential election.

A crowd of supporters gathered near Yoon’s house and his party’s campaign office, shouting his name in celebration.

"This is the victory of our great people," Yoon said in his victory speech at the party office. "I would respect our constitution and parliament and work together with the opposition party to serve our people properly."

IMAGES ALLEGEDLY SHOW CONSTRUCTION AT NORTH KOREA NUCLEAR FACILITY THOUGHT TO BE DESTROYED

Yoon is to take office in May and serve a single five-year term as leader of the world’s 10th largest economy.

Earlier, Lee, a former governor of Gyeonggi province, conceded his defeat at his party headquarters.

"I did my best but wasn’t able to live up to expectations," a glum Lee said. "I congratulate candidate Yoon Suk Yeol. I sincerely ask the president-elect to overcome division and conflicts and open a new era of unity and harmony."

Two-way showdown

Wednesday's election boiled down to a two-way showdown between Yoon and Lee, who spent months slamming, mocking and demonizing each other in one of the most bitter political campaigns in recent memory. Their fighting aggravated already severe domestic divisions and stoked speculation the losing candidate might face criminal probes over scandals that they’ve been linked to.

After winning the election, Yoon said his race with Lee and other contenders has improved South Korean politics. "Our competition is over for now. We should combine our strengths and become one for our people," he said.

SEOUL, SOUTH KOREA - MARCH 10: South Korean President-elect Yoon Suk Yeol of the main opposition People Power Party celebrates with supporters at the party's headquarters on March 10, 2022 in Seoul, South Korea. 

SEOUL, SOUTH KOREA - MARCH 10: South Korean President-elect Yoon Suk Yeol of the main opposition People Power Party celebrates with supporters at the party's headquarters on March 10, 2022 in Seoul, South Korea.  (Getty Images)

Critics say neither Yoon nor Lee has presented a clear strategy for how they would ease the threat from North Korea and its nuclear weapons. They also say voters are skeptical about how both would handle international relations amid the U.S.-China rivalry and how they would address widening economic inequality and runaway housing prices.

Yoon says he would sternly deal with North Korean provocations and seek to boost trilateral security cooperation with Washington and Tokyo to neutralize North Korean nuclear threats. He has made it clear that an enhanced alliance with the United States would be the center of his foreign policy. Yoon said he would take a more assertive stance on China.

Lee, for his part, had called for greater reconciliation with North Korea and a diplomatic pragmatism amid the U.S.-China confrontations.

Closer to Washington?

Some experts say Yoon’s foreign policy stance would put Seoul closer to Washington but he cannot avoid frictions with Pyongyang and Beijing.

"We can expect the alliance to run more smoothly and be in sync for the most part on North Korea, China, and regional and global issues," said Duyeon Kim, a senior analyst at Washington’s Center for a New American Security. "Yoon’s key challenge is whether he will listen to his advisers and whether he’s able to really be tougher toward North Korea and China when he’s faced with political and geo-economic realities after he’s in office."

"Yoon’s key challenge is whether he will listen to his advisers and whether he’s able to really be tougher toward North Korea and China when he’s faced with political and geo-economic realities after he’s in office."

—  Duyeon Kim, senior analyst, Center for a New American Security

Yoon had been current liberal President Moon Jae-in's prosecutor general but resigned and joined the opposition last year following infighting over probes of Moon’s allies. Yoon said those investigations were objective and principled, but Moon’s supporters said he was trying to thwart Moon’s prosecution reforms and elevate his own political standing.

Yoon’s critics have attacked him over a lack of experience in party politics, foreign policy and other key state affairs. Yoon has responded he would let experienced officials handle state affairs that require expertise.

Ruling Democratic Party of Korea presidential candidate Lee Jae-Myung participates in his campaign in Seoul, South Korea, March 8, 2022.

Ruling Democratic Party of Korea presidential candidate Lee Jae-Myung participates in his campaign in Seoul, South Korea, March 8, 2022. (Reuters)

On domestic issues, Yoon was accused of stoking gender animosities by adopting a Trump-like brand of divisive identity politics that spoke almost exclusively to men. He vowed to abolish the country’s Gender Equality and Family Ministry in an apparent bid to win the votes of young men who decry gender equality policies and the loss of traditional privileges in a hyper-competitive job market.

Coronavirus response

An immediate priority for Yoon would be to contain an unprecedented wave in omicron-driven coronavirus infections, which has erased the country’s hard-won pandemic gains. South Korea’s health authorities reported a record 342,446 new virus cases on Wednesday. Hospitalizations and deaths have also been creeping up.

Healing the country’s deepened divide along the lines of ideology, regional loyalties and gender would be a crucial task for Yoon. He may otherwise face huge impasses in his domestic agenda and struggle to push forward his major policies confronting a parliament still controlled by Lee’s party.

Yoon Suk Yeol, the presidential candidate of the main opposition People Power Party, who was elected South Korea's new president on Thursday, holds bouquets as he is congratulated by party's members and lawmakers at the National Assembly in Seoul, South Korea, Thursday, March 10, 2022. 

Yoon Suk Yeol, the presidential candidate of the main opposition People Power Party, who was elected South Korea's new president on Thursday, holds bouquets as he is congratulated by party's members and lawmakers at the National Assembly in Seoul, South Korea, Thursday, March 10, 2022.  (Associated Press)

Yoon has promised to launch a coalition government with Ahn Cheol-soo, another conservative candidate who pulled out of the race last week to throw his support behind him. While Ahn’s withdrawal was believed to have contributed to Yoon’s victory, there are still worries about factional feuding among Ahn and Yoon’s associates, observers say.

CLICK HERE TO GET THE FOX NEWS APP

South Korea’s constitution limits a president to a single five-year term, so Moon could not seek reelection. Moon came to power in 2017 after conservative President Park Geun-hye was impeached and ousted from office over a huge corruption scandal.

With conservatives initially in shambles after Park’s fall, Moon’s approval rating at one point hit 83% as he pushed hard to achieve reconciliation with North Korea and delve into alleged corruption by past conservative leaders. He eventually faced strong backlash as talks on North Korea’s nuclear program faltered and his anti-corruption drive raised questions of fairness.

The tentative voter turnout was 77.1%, the fifth highest ever since the country restored direct presidential elections in 1987 following decades of military dictatorship, according to the National Election Commission.