LIMA, PERU -- The daughter of an imprisoned former president was leading the race for Peru's presidency late Sunday, hours after polls closed in a runoff election held as the coronavirus pandemic continues to batter the Andean country.

With 42 per cent of votes tallied, conservative Keiko Fujimori had 52.9 per cent of the vote, while rural teacher-turned-political novice Pedro Castillo had 47 per cent, according to official results. This is Fujimori's third run for president, a role her father held in the 1990s.

The polarizing populist candidates have promised coronavirus vaccines for all and other strategies to alleviate the health emergency that has killed more than 180,000 people in Peru and pushed millions into poverty. The election followed a statistical revision from Peru's government that more than doubled the COVID-19 death toll previously acknowledged by officials.

"Never was a second round so clearly divided as the present election," Peruvian political analyst Fernando Tuesta said on his Twitter account. In 2016, now-former President Pedro Pablo Kuczynski defeated Fujimori by just 42,597 votes.

Voters across Peru, where voting is mandatory, headed to the polls throughout Sunday under a set schedule meant to minimize long lines. No disturbances were reported at voting sites, which even opened in San Miguel del Ene, a remote village in a cocaine-producing area where two weeks ago a massacre ended with 16 people death.

Pre-election polls indicated the candidates were virtually tied heading into the runoff. In the first round of voting, featuring 18 candidates, neither received more than 20 per cent support and both were strongly opposed by sectors of Peruvian society.

"Well, the truth is that I believe that Peruvians are used to this type of decision -- of being left with two options that leave much to be desired, but what do we do?" one voter, Paul Perez, said at a school in the capital of Lima where he was voting. "We are in a social, cultural situation that limits us to anticipating all of this."

The pandemic not only has collapsed Peru's medical and cemetery infrastructure, left millions unemployed and highlighted longstanding inequalities in the country, it has also deepened people's mistrust of government as it mismanaged the COVID-19 response and a secret vaccination drive for the well-connected erupted into a national scandal.

Amid protests and corruption allegations, the South American country cycled through three presidents in November. Now, analysts warn this election could be another tipping point for people's simmering frustrations and bring more political instability.

"I think in both situations the risk of social unrest is high. It's a time bomb," said Claudia Navas, an analyst with the global firm Control Risks. "I think if Castillo wins, people who support Fujimori or support the continuation to some extent of the economic model may protest."

But Navas said "a more complex scenario will evolve if Fujimori wins because Castillo has been able to create a discourse that has played well in some rural communities with regards to the social divide and saying that political and economic elites have orchestrated things to remain in power and maintain the social inequalities."

The fears of more political instability were evident Sunday.

President Francisco Sagasti after voting said the candidates should respect the results and ask their followers to refrain from staging protests over the outcome. Meanwhile, leftist Castillo asked his supporters before results were released to remain calm.

"Let's wait for the official data, and we will come out to pronounce ourselves at that moment," he said, using a bullhorn in the remote northern district of Tacabamba.

Dozens of Castillo's followers marched in support of the candidate through the streets of Huancayo, the most important city in central Peru.

Fujimori remained at her campaign headquarters in Lima, where she received a visit from a locally known Brazilian seer.

For Lima resident Felipa Yanacris, Peru's presidential politics "desperately" need a shake-up. "We want change, we have been waiting for 30 years of change," Yanacris said.

Fujimori voted in the wealthy neighborhood of the capital of Lima where she lives, urging people to vote "without fear," while Castillo appealed for calm while casting his ballot alongside his parents in the rural Anguia area.

The former congresswoman, has promised various bonuses to people, including a $2,500 one-time payment to each family with at least one COVID-19 victim. She has also proposed distributing 40 per cent of a tax for the extraction of minerals, oil or gas among families who live near those areas.

Her supporters include the wealthy players of the national soccer team and Mario Vargas Llosa, Peru's foremost author and the winner of a Nobel Prize in literature. Vargas, who lost a presidential election three decades ago to the candidate's father, Alberto Fujimori, has moved from calling her the "daughter of the dictator" in 2016 to considering her to be the representative of "freedom and progress."

Keiko Fujimori herself has been imprisoned as part of a graft investigation though she was later released. Her father governed between 1990 and 2000 and is serving a 25-year sentence for corruption and the killings of 25 people. She has promised to free him should she win.

Castillo until recently was a rural schoolteacher in the country's third-poorest district, deep in the Andes. The son of illiterate peasants entered politics by leading a teachers' strike. While his stance on nationalizing key sectors of the economy has softened, he remains committed to rewriting the constitution that was approved under the regime of Fujimori's father.

Among Castillo's supporters are former Bolivia President Evo Morales and former Uruguay President Jose Mujica, who in a conversation via Facebook told Castillo on Thursday to "not fall into authoritarianism."

Peru is the second largest copper exporter in the world and mining accounts for almost 10 per cent of its GDP and 60 per cent of its exports, so Castillo's initial proposal to nationalize the nation's mining industry set off alarm bells among business leaders. But regardless of who gets picked to succeed Sagasti on July 28, investors will remain skittish.

"A victory for left-wing populist Pedro Castillo in Peru's presidential election on Sunday would probably send local financial markets into a tailspin, but we doubt that investors would have much to cheer about even if his rival Keiko Fujimori wins," Nikhil Sanghani, emerging markets economist with Capital Economics, wrote in an investors note Friday.

"Fujimori is a controversial figure who is under investigation for corruption charges. Given Peru's recent history, it's not hard to imagine that this could spark impeachment proceedings," he said.

------

Garcia Cano reported from Mexico City.