Updated

The shadow of an imprisoned former president looms over Sunday's Peru election, which has become in many ways a referendum on the legacy of Alberto Fujimori's iron-handed rule in the 1990s.

Many of the nation's rural, indigenous poor have flocked to the support of his daughter Keiko, grateful for her father's success in routing guerrillas who preyed on their communities.

But tens of thousands have marched in the streets of the capital against the return of any Fujimori, haunted by the memory of the elder's bloody crackdown on dissent and corrupt government, which have him serving 25 years in prison. Even leading politicians from the left have endorsed former Wall Street banker Pedro Pablo Kuczynski.

Recent polls showed Fujimori opening a small lead over Kuczynski, though within the margin of error and with a large number of voters still undecided. Fujimori had 45 percent support in a GfK poll of 1,508 people taken May 23-25 compared with 41 percent for Kuczynski. The survey had a margin of error of 2.5 percentage points.

The two candidates have focused mostly on fighting crime and corruption. But the success of the winner's administration is likely to depend most on an ability to keep investment flowing to a mining industry that has been ravaged by low international prices.

Peru's economy soared in recent years on the back of mining, which now represents about 15 percent of gross domestic product. Thanks to record foreign investment, Peru reduced its foreign debt and slashed poverty by more than half in the last 15 years, according to government data. It became the world's third-largest copper producer and a major player in the gold market.

But more than a dozen mining projects are now stalled, including the country's two biggest, Tia Maria and Conga, which had been expected draw a combined $6 billion in investment. Many also face militant resistance from local communities fearing pollution or the loss of their water and farmland.

It was Alberto Fujimori who opened the country to mining in the 1990s after reclaiming much of Peru's countryside from Maoist rebels and adopting free-market policies that helped spur the economy.

His daughter, a former congresswoman who served as first lady during much of his term, is capitalizing on a well-funded campaign as well as those who remember her father fondly.

Kuczynski, once president of a U.S.-owned mining company in West Africa, has gotten a powerful boost from those fearful of the Fujimori name.

"None of the candidates inspires confidence. We're going to defend ourselves against the imposition of mining," said Marilu Marroquin, a farmer leading protests against the Mexican-owned Tia Maria copper mine project in southern Peru.

Marroquin and some 1,500 rice and potato farmers fearing for their livelihood held a three-day strike last month against Tia Maria, where clashes with police last year killed four people and injured 300.

On the other side of Peru, the Conga gold and copper project faces resistance from opponents of owner Newmont Mining Co.'s plans to dredge four high-altitude lakes, a move they say will contaminate drinking and irrigation water downriver.

The country's ombudsman last month reported 72 mining conflicts, slightly more than a year ago, in the lead up to the presidential vote.

Fujimori has said she would strengthen oversight and listen more to local opponents if she becomes president, but said the central government will remain the "fair arbiter" of mining conflicts. Kuczynski has said that he'd deliver electricity, roads and drinking water before opening the areas to mining.

The candidates differ on how to combat illegal mining, which is estimated to account for as much as a fifth of the country's gold production.

In an attempt to attract voters among Peru's roughly 400,000 small-scale miners, Fujimori has vowed to repeal a decree by outgoing President Ollanta Humala that allowed destruction of dredges and heavy machinery found at wildcat mines. She has said police crackdowns only discourage miners from seeking authorization to operate legally.

Kuczynski has called his rival's proposals a license to continue polluting and says there are better incentives to eliminate illegal practices, such as paying miners more if they demonstrate respect for the environment and labor standards.

___

Franklin Briceno on Twitter at https://twitter.com/franklinbriceno His work can be found at: http://bigstory.ap.org/author/franklin-briceno

___

AP Writer Joshua Goodman contributed to this report from Lima.