Far-left candidate Pedro Castillo will face conservative Keiko Fujimori in a June run-off of Peru's presidential election, according to a fast count by pollster Ipsos of more than two thirds of votes cast in Sunday's election.
Castillo, a 51-year-old union leader and primary school teacher, secured 18.6% of the votes, while 14.5% went to Fujimori, the daughter of imprisoned former president Alberto Fujimori, the tally of 69.1% of the vote showed.
The outcome would do little to calm market jitters over the future leadership of the world's second largest copper producer, however.
Castillo has pledged to redraft the constitution of the Andean nation with a view to weakening the business elite and giving the state a more dominant role in sectors such as mining, oil, hydropower, gas and communications.
Free marketeer Fujimori is a deeply divisive figure whose father was jailed for human rights abuses. She herself has spent time on remand over claims that she received $1.2 million from Brazilian construction company Odebrecht, which she denies.
Hernando de Soto, the liberal economist whom an exit poll suggested was tied in second place with Fujimori, dropped to fourth position in the fast count, with 10.8% of the vote.
An ultra-right candidate, Rafael Lopez Aliaga, rose to third place with 11.9% of the vote, according to the Ipsos tally.
Ipsos said it had counted 69.1% of the votes nationwide, with a one-point margin of error in its findings.
Castillo's lead was confirmed by the first official results released, giving him 15.8% of voteshare, but ranking Fujimori behind de Soto and Lopez Aliaga, with 12.19%, 14.48% and 13.13% respectively, after 11% of votes have been counted.
Celebrations, which started after Castillo's lead was first suggested in an exit poll, ran into the night in his home city of Cajamarca, in Peru's northern highlands.
"I am grateful to the Peruvian people for this result," Castillo, who had worn a trademark cowboy hat when he arrived on horseback to vote, told supporters. "I ask for calm until the final results."
The teacher put on a late surge in the polls, and according to the exit poll, won most votes in Peru's five poorest regions.
In addition to a pledge to tear up the 27-year-old constitution, a key demand of the young protesters who launched anti-government demonstrations last year, he has said he will keep his teacher's salary and cut those of lawmakers.
Peruvians also voted for representative to the 130-seat congress.
Exit poll results for that contest from Ipsos Peru suggested the body would stay fragmented, with 11 parties meeting the 5% threshold for representation but no party holding a clear majority, a potential hurdle for policymaking.
The Popular Action party of socially conservative presidential candidate Yonhy Lescano and Castillo's Free Peru party each obtained 10.7% of the votes, the Ipsos poll suggested.
They were followed by the Popular Force party of Fujimori with 9.5%, the Popular Renovation party of Lopez Aliaga with 8.8%, and the Country Forward party of de Soto with 8.4%.
Additionally, the Alliance for Progress party of businessman Cesar Acuña got 7.9% and Mendoza's Together for Peru party 7.7%, according to the exit poll result.
Peru is battling a second wave of the coronavirus pandemic, reporting a grim new daily record of 384 deaths on Saturday.