Alan Garcia has been returned to power in the second round of Peru's election after 16 years in the political wilderness.
However, his nationalist rival Ollanta Humala, has refused to admit defeat until all the votes are counted.
Sunday's vote came after a fierce and aggressive campaign.
For many the choice had been an unappealing one and it was predicted that undecided voters would sway the balance.
Mr Humala's nationalist message had struck a chord among poorer voters.
Mr Garcia's presidency from 1985-1990 was marked by rebel attacks and rampant inflation.
But he is a charismatic speaker, who was able to hold the attention of huge crowds.
Correspondents say the victor's biggest challenge will be to unite a politically divided country.