Socialist candidate Pedro Castillo, the narrow favorite to win Sunday's run-off vote, has proposed new royalties on mineral sales and has floated a plan to renegotiate long-standing tax deals struck under previous governments.

A teacher who was a shock winner in the first round vote, Castillo has accused mining firms of "plundering" Peru's wealth. He has spoken about more than doubling the state's share of mining profits to 70%, and using the funds for boosting healthcare and education and reducing income inequality.

A Reuters analysis of government data shows this would hit Chinese mining firms hardest, including MMG Ltd and Aluminum Corp of China (Chinalco), if Castillo were to win the election and follow through with his plan.

Chinese mining firms have become a key player in Peru's mining industry. The Asian country is by far the largest buyer of Peruvian copper, used for everything from construction to the development of electric cars.

Peru has signed as many as 25 tax stability agreements since the 1990s, the data from the Mines and Energy Ministry shared with Reuters shows. The deals are meant to buffer investors from political or economic upheaval and experts say they set the stage for investment in some of the country's largest mines.

Castillo's tax plan could further unnerve markets and ratchet up uncertainty in the world's top copper producing region. In neighboring Chile, the world's No. 1 copper producer, the lower house of congress has already approved a plan to hike royalties on mining.

MMG, which operates the Las Bambas copper mine in Peru, signed a contract in 2011 that guarantees no change in taxation on its operations until the end of 2030, the ministry data show.

That deal encouraged the company to invest $10 billion at the sprawling mine that now churns out 350,000 tonnes of copper per year, according to company data.

Brokerage Jefferies said in a note MMG was highly exposed to Peru, given the importance of the Las Bambas mine.

"Peru tax/royalty increases could therefore be an issue, depending on the outcome of the upcoming presidential runoff," it said.

Chinalco inked a tax stability deal through 2028 with Peru, the data showed. The company's Toromocho mine produces 200,000 tonnes of copper concentrates per year.

Future projects may also be impacted.

Mining giant Anglo American and partner Mitsubishi signed a tax stability deal through 2037 for their soon-to-be completed $5.3 billion Quellaveco copper mine set to come online in 2022 with 330,000 tonnes of copper production.

The firms did not immediately comment for this story.

A win by Castillo, who is neck-in-neck in polls with business-friendly conservative Keiko Fujimori, would send political risk soaring in the region. Top copper producer Chile is also debating whether to hike royalties on miners and has begun a process to overhaul its constitution.

That uncertainty is supporting global copper prices, which have hit record highs as Chinese demand bounces back, while a rapid push towards electric vehicles should boost appetite for copper in years ahead.

Several other miners in Peru could face fresh talks with Peru's government if Castillo wins on Sunday, the data shows.

The Constancia copper mine, operated by Canada's Hudbay Minerals, holds a tax deal set to expire in 2031.

The Cerro Verde Mine, controlled by Freeport McMoRan, and Glencore's Minera Antapaccay hold similar deals through the end of 2028.

(Reporting by Marco Aquino; Writing by Dave Sherwood; Editing by Adam Jourdan and David Gregorio)

By Marco Aquino