South Korean president-elect Yoon Suk-yeol (Yonhap photo)

SEOUL – Opposition candidate Yoon Suk-yeol was elected South Korea's next president Thursday after an unbelievably close race that underlined deep divisions along regional, generational and gender lines, and hands him a daunting task to narrow those chasms.

With all the votes counted, Yoon of the conservative People Power Party (PPP) had 48.56 percent of the vote and Lee Jae-myung of the liberal Democratic Party (DP) took 47.83 percent, according to the National Election Commission.

The 0.73 percentage-point gap makes this year's election the closest ever.

"We, the people of the Republic of Korea, are one. Regardless of region, camp or class, the people of the Republic of Korea are equal people of this nation wherever they are, and must be treated fairly," Yoon said in an address before party officials at the National Assembly.

"I will consider national unity as my top priority," he said.

Yoon also described his election as a "victory of the great people."

Ruling party candidate Lee conceded defeat and congratulated Yoon.

"I did my best but failed to live up to your expectations," he said. "All responsibility lies with me. I extend my congratulations to candidate Yoon Suk-yeol."

Yoon said that he learned during the campaign "what is required in order to become a national leader and how to listen to the voices of the people."

He also thanked his competitors Lee and Sim Sang-jeung of the minor progressive Justice Party.

"Our competition is over for now," he said. "We must work together to become one for the people and for the Republic of Korea."

Yoon added that as soon as he takes office he will respect the spirit of the Constitution and the National Assembly while working together with the opposition party and serving the people.

Lee had initially led Yoon but the gap between them narrowed before Yoon overtook Lee at the point where 51 percent of the vote was counted.

This year's race was billed as an "unlikeable election" due to the public's aversion to the candidates and their negative campaigning against each other.

Yoon, 61, a former prosecutor general, rode a wave of public anger at the administration of outgoing President Moon Jae-in and his ruling party to seize on a message of fairness, common sense, principle and the rule of law.

Yoon's election could have profound impacts on the direction South Korea will take on foreign policy, including relations with North Korea, and on economic issues, such as welfare and real estate policies.

Yoon takes a hard line on national security, saying a preemptive strike may be needed to respond to an imminent threat from North Korea. He has also pledged to deploy additional units of the U.S. THAAD anti-missile system in South Korea to deter North Korean aggression.

Yoon's challenges as he is handed power from a liberal administration include an opposition-controlled National Assembly, heralding a tough legislative battle to push the new administration's agenda.

Even with the addition of four PPP lawmakers through Wednesday's by-elections that were held concurrently with the presidential election, the PPP only has 110 of the total 300 seats, while the DP has 172.

Yoon is expected to make real estate policy a key focus of his presidency following criticism it was one of the biggest failures of the outgoing Moon administration.

As a candidate, he pledged to supply 2.5 million more homes over the next five years and to ease regulations while lowering real estate taxes.

One of his most controversial pledges was to abolish the Ministry of Gender Equality and Family, which he accused of fomenting division between men and women.

Critics, however, viewed the move as a bid to woo young male voters resentful of the rise of feminism.

Yoon said he would instead launch a new ministry that will comprehensively handle issues related to children, families and the demographic crisis.

Public interest will also likely be high in what role Yoon's wife, Kim Keon-hee, will carve out for herself after remaining largely out of the public eye during the campaign, except to offer a public apology over allegations she lied on her resume during job applications.

With Wednesday's election, the conservative bloc reclaimed power after just five years, breaking the previous pattern of the presidency changing hands between conservatives and liberals every 10 years. (Yonhap)