Former World Bank economist Pedro Pablo Kuczynski has won the closest presidential contest in Peru in five decades, election officials said.
With all the votes counted, the electoral board said Kuczynski received 51.1 percent compared to 49.9 percent for Keiko Fujimori, daughter of imprisoned ex-President Alberto Fujimori.
Supporters immediately celebrated outside Kuczynski's campaign headquarters while the apparent president-elect sent a brief message on Twitter thanking his countrymen. "Now it's time to work together for the future of our country,'' he wrote.
But the gap between them was so small that an electoral court must settle the matter of the 0.2 percent of ballots that have been challenged for smudges, improper markings or other issues before a winner can be declared.
However, pollsters say it would be virtually impossible for Fujimori to win.
"I am not going to make any statement," Fujimori said Thursday. "I am going to wait. We are waiting patiently."
A week ago, Fujimori had been the favorite to win. But Kuczynski caught up with her in final opinion polls as Peruvians weighed the legacy of her father — who was convicted of corruption and human rights abuse — and scandals involving her own close advisers.
Some Peruvians credit the elder Fujimori with defeating violent Shining Path guerillas and building rural schools during his decade-long rule.
Kuczynski has promised to invest in infrastructure projects and lower sales taxes to revive economic growth that has slowed with tumbling mineral prices.