SEOUL, March 10 (Aljazeera) - Yoon Suk Yeol, a conservative former top prosecutor, has been elected South Korea’s new president, defeating his chief liberal rival in one of the country’s most closely fought presidential elections.

With more than 98 percent of the ballots counted, Yoon had 48.6 percent of the votes against his rival Lee Jae-myung’s 47.8 percent.

Yoon said on Thursday that he would honour the constitution and the parliament and work with opposition parties when he takes office as the country’s next leader, calling the election result a “victory of the great people”.

“Our competition is over for now,” he said in an acceptance speech, thanking and consoling Lee and other rivals.

“We have to join hands and unite into one for the people and the country.”

At a separate ceremony with supporters, Yoon said he would put top priority on “national unity,” adding all people should be treated equally regardless of their regional, political and socioeconomic differences.

“I would pay attention to people’s livelihoods, provide warm welfare services to the needy, and make utmost efforts so that our country serves as a proud, responsible member of the international community and the free world,” he said.

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.”

The election boiled down to a two-way showdown between Yoon from the opposition People Power Party and Lee from the governing Democratic Party. They spent months slamming, mocking and demonising each other in one of the most bitter political campaigns in recent memory, aggravating the country’s already severe domestic divisions.

Critics said neither candidate has presented a clear strategy for how they would ease the threat from North Korea and its nuclear weapons. They also said voters are sceptical about how both would handle international relations amid the US-China rivalry and how they would address widening economic inequality and runaway housing prices.