MONTEVIDEO, Uruguay (AP) — A center-right candidate appeared Monday to have ended 15 years of left-leaning government in Uruguay, but the presidential runoff election was so close that the result may not be certain until Thursday.

With all but a few thousand ballots from Sunday’s contest counted, Luis Lacalle Pou of the National Party maintained an edge of nearly 29,000 votes over Daniel Martínez of the governing Broad Front coalition out of nearly 2.3 million votes cast.

José Arocena, head of Uruguay’s Electoral Court, said it could not yet declare a winner because "there was never such a tight ballot."

He added that final results might not be announced until Thursday.

Lacalle Pou predicted he would emerge as the victor to replace current President Tabaré Vázquez of the Broad Front, which will have governed for 15 years when Vázquez hands over power in March.

“The result is irreversible,” the center-right politician told a crowd of supporters who chanted, “President! President!”

Martínez declined to concede, saying would await the final results.

Still to be counted were 35,000 votes from people and soldiers who had helped oversee the voting, but the lead seemed insurmountable.

The result — a difference of about 1.2 percentage points — was far closer than opinion polls had indicated.

A communications adviser to the center-left Independent Party, Álvaro Ahunchaín, said some moderate voters may have been swayed toward the Broad Front because of messages sent by far-right groups in the run-up to the vote that appeared echo the hardline rhetoric of the military dictatorship of 1973-1985.

“Marxism must begin to be definitively extirpated from the horizon of our national destiny,” said a widely circulated social media message aimed at retired officers.

Uruguay so far has escaped the turbulent, sometimes partisan protests that have swept Chile, Bolivia and recently Colombia. Sunday’s election was calm and festive.

Martínez got the most votes in October’s first round, topping Lacalle Pou 39% to 29%. But the challenger hammered together the support of four other parties that were knocked out in that balloting.

Lacalle Pou, a 46-year-old lawyer and a former senator, is the son of former President Luis Alberto Lacalle and his mother was a senator.

During his campaign, he criticized the Vázquez administration for a soft economy, a rising deficit and increasing crime.

Martínez, a 62-year-old engineer who was recently mayor of Montevideo, stressed the long-term success of the Front’s policies over the past decade and a half.

A member of the Socialist Party, Martínez represents the more moderate and center-left wing of the Broad Front, which is a coalition of social democrats, communists, Christian democrats and former guerrilla members.

Vázquez led the Broad Front to power in 2005, ending dominance by the Colorado and National parties dating back to independence in 1828. The economy was healthy during his first term and that of his successor, José Mujica. But growth slowed in Vázquez’s second term, crime rose, an education reform flopped and Vice President Raúl Sendic was forced to resign in 2017 over corruption allegations.

Vázquez, a 79-year-old oncologist, announced in August that he had been diagnosed with cancer. His successor’s five-year term starts March 1.

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