A moderate leftist who gained renown as a human rights advocate consolidated what remained a narrow lead (0.81%) Tuesday over her pro-business rival. Whoever wins, Lima will have its first elected female mayor ever.
A victory by Susana Villaran would give the left control of Peru's capital with 7 million people and home to one in three of Peruvians, for the first time since 1983.
Villaran, a 61-year-old former rights ombudsman and ex-minister of social development and women's affairs, was leading Lourdes Flores 38.4% to 37.6% with 73% of the vote counted from Sunday's balloting.
Flores, 50, has twice lost presidential races while Villaran was a fringe candidate in the 2006 election in which Flores finished third.
The Lima mayor's race was being watched closely as a barometer of presidential elections due in April. Villaran doesn't own a car and has deliberately made a point of living in Lima's poorer districts.
She is not allied with the main radical contender in the presidential race, populist ultra nationalist former military officer Ollanta Humala, though he endorsed her.
President Alan Garcia, who is constitutionally barred from running for re-election, defeated Humala in 2006 in a runoff. The current front-runners in the April election are Keiko Fujimori, daughter of disgraced former President Alberto Fujimori, and Luis Castañeda, the current Lima mayor.
Sunday's nationwide vote for governors and mayors saw, for the first time, militants from the Shining Path guerrilla movement run for office.
However, none of the seven candidates that ran under the auspices of the Movadef movement, which is lead by lawyers for jailed Shining Path leader Abimael Guzman, won more than 3.9% of the vote in their respective races.
Most ran in Puno state, one for mayor of a poor Lima district, San Martin de Porres. Movadef advocates a blanket amnesty for all prisoners convicted of crimes associated with Peru's 1980-2000 dirty war, which claimed nearly 70,000 lives.
An independent truth commission found Shining Path responsible for most of the deaths, followed by state security forces.
The charismatic Villaran overtook Flores in opinion polls in the campaign's last few months, promising to extend public services to Lima's poor and reduce the city's air pollution, which is among the world's worst.
Villaran rejects what she has called the authoritarian militarism of Venezuela's president, Hugo Chavez, saying she identifies with more moderate leftist leaders such as Chile's former president Michelle Bachelet and Brazil’s Lula da Silva.