With all votes counted, the economist Pedro Pablo Kuczynski appears to have won the majority of votes in Peru's cliff-hanger presidential election.
The electoral commission said he received 50.12% of votes, against 49.88% for his rival, Keiko Fujimori.
About 50,000 ballots must first be settled by an electoral court before a winner can be officially declared.
Ms Fujimori has yet to concede, but Mr Kuczynski tweeted his thanks to the Peruvian people.
"It's time to work together for the future of our country," he told his followers on Twitter
This has been the tightest fought election in Peru in five decades.
As the last few votes were counted, the candidates remained neck-and-neck, with Mr Kuczynski leading by a tiny margin.
The closeness of the result came as a surprise after polls in the run-up to the election had suggested Ms Fujimori had a comfortable lead.
Analysts said corruption scandals in Ms Fujimori's Popular Force Party may have dented her support since April, when she comfortably won the first round of voting.
She is the daughter of Peru's former President, Alberto Fujimori, who is in jail for crimes against humanity.
'Promoting economic growth'
Mr Kuczynski, who is an ex-Wall Street financier, said he would use his international financial experience to promote economic growth.
He has the support of prominent figures such as Nobel-Prize-winning novelist Mario Vargas Llosa and left-wing candidate Veronika Mendoza, who came third in the first round of voting.
But he has faced scrutiny over his close relationship to Peru's business elite.