SKOPJE, North Macedonia (AP) — Stevo Pendarovski, the presidential candidate backed by North Macedonia's center-left government, won the presidency Sunday in a runoff election with a conservative rival.

State election commission chief Oliver Derkorski announced late Sunday that with nearly 99 percent of the votes counted, Pendarovski, the candidate of the ruling Social Democratic Union, had won with 51.8% of the votes. Gordana Siljanovska Davkova, the candidate favored by the conservative opposition VMRO-DPMNE party, got 44.5%.

The two politicians had each received about 42% in the first round of voting April 21, which had three candidates.

Even before the official announcement, Social Democrat supporters had gathered at the party's headquarters in downtown Skopje, the country's capital, to celebrate as favorable results trickled in.

"This is a victory for all who are convinced that we have to continue forward together and I promise I'll serve all the people equally," Pendarovski said from the Social Democrats' headquarters. He also thanked the people for their "wise choice."

"Our path is paved with success. ... We all will continue to move forward toward our common goal of progress and ... toward NATO and the European Union," said Prime Minister Zoran Zaev.

Siljanovska accepted her defeat but took a rosy view.

"The figures say defeat, but I've never felt more fulfilled .," she said. "I believed I could help Macedonia to gain democracy. ... I know that the other candidate has won, but I know that I did not lose the battle."

The election was seen as a test of the government's pro-West policies. Pendarovski backed the government deal with Greece that renamed the country in exchange for NATO membership, while Siljankovska criticized it.

A key question in the runoff had been whether voter turnout would reach the 40% threshold needed for the election to be valid. The head of the election commission said the final turnout figure was 46.4% of registered voters, in what he had earlier termed a "peaceful and dignified" election.

Election observers reported a small number of minor infractions, such as voters photographing ballots with cellphones and disturbances outside some polling stations.

Naum Stoilkovski, a VMRO-DPMNE spokesman, complained about police "putting pressure" on party observers.

North Macedonia's previous constitutional name was the Republic of Macedonia. The name change took effect in February as part of an agreement to end a decades-long dispute with Greece, which blocked the former Yugoslav republic's path to membership in NATO and the European Union over rights to the Macedonia name.

Both Pendarovski, 55, and Siljanovska, 63, are law professors. Siljanovska said as she cast her ballot Sunday that she would respect the new constitutional name in a professional capacity "but will not use it personally" and planned to do her "best to show that the Prespa agreement (with Greece) has severe (legal) problems."

Although the presidency is mostly ceremonial, with some powers to veto legislation, the outcome of the vote could trigger an early parliamentary election. Prime Minister Zaev, who staked his reputation on negotiating the name deal, said he would call one if Pendarovski were not elected.

Outgoing President Gjorge Ivanov, a conservative, is serving his second and final five-year term, which ends on May 12. Ivanov opposed the agreement with Greece.

Copyright 2019 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.