No. 3 copper miner Peru has seen its credit rating increased one level by Standard & Poors — climbing above top regional mining nations Brazil and Mexico — as mining investment fuels growth in the South American nation with some of the world’s most prolific ore deposits.

Peru’s long-term foreign-currency rating, which applies to dollars and euro bonds, rose to BBB+–, three levels above junk grade, S&P said, while its outlook remains stable. Mine construction, meanwhile, will total 50% of $42 billion in private investment between 2013 to 2015, according to its central bank.

This makes Peru the No. 1-ranked Latin American economy after Chile — one of the world’s biggest miners with the world’s No. 1 copper deposits — with four levels higher at AA-. Brazil, with Latin America’s No. 1 iron ore deposits and a top mining company, and Mexico are a level lower at BBB; both these nations have been forecast to join the U.S., China and India as the world’s leading economies in the coming decades.

This represents a dramatic contrast to recent Peruvian history. In the late 1980s and early 1990s, the country was seized by a vicious domestic Marxist insurgencies followed by an equally paralyzing political scandal.