By Dan Collyns for the BBC
The battle to be mayor of Lima, finally won by Susana Villaran, may have been the tightest electoral race in Peru’s history. It was certainly one of the most drawn-out.
Electoral officials took more than three weeks to recount 8,384 ballots that were challenged over technical errors such as missing fingerprints and signatures on tally sheets.
Exasperated Lima residents, who cast their votes on 3 October, took to the streets in protest just a day before conservative candidate Lourdes Flores conceded defeat to Ms Villaran.
Ms Villaran, the candidate for a leftist movement known as Fuerza Social (Social Force), becomes the first elected female mayor of the Peruvian capital since it was founded in 1532.
The former teacher and human rights activist will also be the first leftist mayor of Lima since 1983 when she takes office in January.
But despite her clear popularity among a section of the electorate, Ms Villaran’s leftist credentials caused some dismay among the business elite and powerful conservative sectors of the establishment.
Ms Flores, the candidate for the right-wing Partido Popular Cristiano, tapped into fears about the radical left to rapidly gain on Ms Villaran’s 12% lead in the opinion polls in the last week of campaigning.
“I haven’t seen such a surprising election in the last 30 years,” said Fernando Tuesta, political scientist and pollster at Lima’s La Catolica University.
“Susana Villaran’s lead appeared to be unassailable and then Lourdes Flores caught up within 24 hours.”
“She managed to summon up the nightmare of terror. For the Peruvians who lived it and Peruvians who inherited its legacy,” he said referring to Peru’s internal conflict with the communist Shining Path rebel group in the 1980s and 90s in which nearly 70,000 people were killed.
Sections of the media joined in. On election day, one newspaper’s headline read: “Between Terrorism and the Future”, with a picture of the two candidates.