(Bloomberg) -- Peruvian Prime Minister Alberto Otarola vowed to keep social unrest in check to allow mines to continue churning out copper and pave the way for investments needed to retain the nation’s status as the second-biggest producer of the metal.

The government will defend Peru against lawlessness and the kind of disruptive protests that broke out late last year after the ouster of former President Pedro Castillo, the prime minister said Tuesday at the Perumin mining conference in Arequipa, a Peruvian city surrounded by giant copper deposits.

“Whoever says Peru isn’t a mining country is an ideologue — mining is essential for development of our country,” Otarola told a pavilion packed with executives, analysts and authorities. “We won’t allow the country to fall into chaos and disorder.”

Read More: Chinese-Owned Mine Hit by More Delays in Key Peru Copper Project

Otarola’s pledge to continue a hard line against unrest contrasts with the softer approach displayed by the previous administration. For now, it’s working, with copper output up about 20% through July and set to reach about 2.6 million metric tons for the year, up from 2.4 million tons last year.

The blockades that disrupted copper shipments and mine supplies late last year and early this year have been cleared, with thousands of police officers mobilized. A new mine built by Anglo American Plc is also helping the year-on-year comparison.

But while that’s been enough for Peru to remain the No. 2 copper-producing nation — just ahead of Democratic Republic of Congo — investments are declining. That is jeopardizing future output and undermining chances of a recovery in the struggling economy of the South American country. Peru’s central bank expects mining investment to fall 18% this year and 8% in 2024.

To be sure, authorities have said they’re working hard to unlock projects that have been stuck for years. They’re looking to have permitting in place for nine key projects by the end of the year and are moving forward with the streamlining of red-tape.

Teck Resources Ltd. is advancing with permits for its $1.4 billion Zafranal project while authorizations for a $2 billion expansion at the Antamina copper-zinc mine owned by BHP Group, Glencore Plc and Teck are expected soon.

Other investments remain on ice. In June, Newmont Mining Corp. delayed a decision to invest $2.5 billion at its Yanacocha mine. Fiercely contested projects such as Southern Copper Corp.’s $1.4 billion Tia Maria remain in limbo amid lingering socio-political tensions in a country where relations with isolated rural communities often sour.

Peru’s struggles to develop more of its copper riches are also tied to industrywide logistical challenges exposed by the pandemic and exacerbated by Russia’s invasion of Ukraine, with project lead times and budgets expanding.

©2023 Bloomberg L.P.