Something extraordinary is happening in Peru.

There has been considerable improvement in the economy and in the stability of political life. And the country is experiencing strong -- though still limited -- progress in its social programs. But above and beyond these achievements, Peruvians are changing the painful perception they have long had of themselves and their country’s place in the world; they are altering the country’s mentality, that set of conceptions and practices known as its “customs” (las costumbres).

“Time has created customs with the same patience and slow pace as the growth of mountains,” wrote the great Spanish novelist Benito Perez Galdos.

If there is a country that confirms this aphorism, it is the mountainous and hierarchically traditional Peru. When I first went there in 1979, I noticed how Peruvians ridiculed themselves: “The modern Inca is inca-pable,” they would pun. They displayed a nostalgia for an archaic Inca Eden destroyed by the Spanish Conquest. They also despaired at the backwardness of the Andean region compared with the coast, the poverty and submissiveness of the Indian majority, the omnipresence (in language, social treatment, political disputes) of fierce ethnic rancor, and even their geographic remoteness from Europe and the U.S., the true centers of power and development.

Bloody Conquest

I remember walking in Cuzco, past the colonial churches whose beautifully fitted masonry was built on the visible foundations of Inca temples; clear architectural emblems of the bloody conquest of Peru. It was a golden twilight and I heard an Indian melody being played on an Andean flute. It was probably a Quechua love song, but it seemed the saddest music I had ever heard.

I next visited in 1990. The country had passed through various military regimes and was now mired in a careless populism that had almost destroyed the economy. And it was wracked by the savage uprising of the Shining Path, the Maoist guerrilla group that inflicted a parade of horrors. I saw an army of child beggars flooding the commercial zones of Lima, soldiers patrolling the streets -- alert to the next terrorist outrage, kidnapping or assassination -- and speculators in the streets waving handfuls of devalued currency. The Peruvian central bank had exhausted its reserves. In 1989, inflation had risen to 2,600 percent and gross national product had fallen 15 percent.

The novelist Mario Vargas Llosa was running for president. He advocated a program of economic modernization to open the frontiers to trade and expand the free market. In a bitter campaign, the future Nobel laureate was defeated by Alberto Fujimori (a loss that would wind up being greatly to the benefit of world literature.) Many (especially poorer) Peruvians were convinced that Vargas Llosa’s social proposals were harmful, but Fujimori incorporated a number of them into his economic program. Fujimori had a measure of success in the early years of his first term. Then his presidency, besieged and degraded by the brutal struggle against the Shining Path, degenerated into internal violence and rampant corruption. He defeated the guerrillas, yet the many abuses of his dictatorial government eventually led to his conviction by a Peruvian court and imprisonment.

But the movement toward economic modernization (and the defeat of the Shining Path) seems, in retrospect, to mark the beginning of Peru’s ascent. Good omens appeared amid the country’s troubles. First, there was the election of President Alejandro Toledo, of Indian origins and a graduate of Stanford University, whose biography in itself seems to represent the beginning of reconciliation between the past, violently divided factions of Peruvian history.

‘State of Law’

Then, there was a populist president (Alan Garcia) who, in his second term, recognized his previous economic errors and chose the road of modernization. He was followed by the current president, Ollanta Humala, who had once led an abortive attempt at a leftist military coup but now considers “the divisions of left and right to be obsolete,” defends the “state of law” and is following not the path of Venezuela’s Hugo Chavez but the highly successful Brazilian road of democracy championed by Luiz Inacio Lula da Silva and his presidential successor, Dilma Rousseff, combining a modernized economy with strong social commitment.

Peru’s problems continue to be immense, but they are being actively confronted. There is, of course, the menace of the drug trade, which hangs like a dark cloud over much of Latin America. And the country has a long backlog of deficits in infrastructure, housing, basic services, education and fair competition. But focused programs of social aid now exist, and the Humala government has created a Ministry of Development and Social Inclusion meant to supervise, coordinate and maintain their integrity. According to the Peruvian Ministry of Economy and Finance, the absolute poverty rate is being reduced and has already been shrinking over the past 10 years (to 31 percent from 53 percent -- though it still stands at 54 percent in rural areas). The objective is to reduce this rate to 15 percent by 2020.

At the same time, a modernizing economy and business-friendly environment is being maintained, and only Chile is considered a more hospitable environment for investment in the region.

Globalization has transformed the economic geography of Peru. “We’re a China in miniature,” said the intellectual Alfredo Barnechea, noting the impressive migration from the poverty-plagued Andean regions to the coastal cities, where employment has grown 37 percent, due to an expansion of construction and consumption. China has become a major market for Peruvian raw materials, receiving 15 percent of total exports. With an inflation rate forecast to be only 2.4 percent to 2.6 percent this year, the country is now growing by about 6 percent per year, has quintupled its external investments and boosted its exports sixfold. Its economic growth has been favorably compared to Singapore, China and South Korea.

A few weeks ago, I visited the Sacred Valley near the ancient Inca city of Machu Picchu and stood by the crystal-clear waters of the Vilcanota River. The streets of its villages were clean and well-kept. The signs of economic improvement were everywhere. I looked at the striking array of ancient agricultural terraces on the mountain slopes. They were sculpted into the mountains six centuries ago by Inca peasants and engineers, along with astronomical observatories and temples to their gods.

Today, the modern Peruvians, the new Incas, are performing their own miracles of national construction, moving new mountains for the benefit of the present and the future.

(Enrique Krauze, the author of “Mexico: Biography of Power” and “Redeemers: Ideas and Power in Latin America,” is a Bloomberg View columnist. The opinions expressed are his own. This article was translated from the Spanish by Hank Heifetz.)

Read more opinion online from Bloomberg View.

Today’s highlights: the View editors on European austerity and antibiotics in farm animals; Edward Glaeser on Mitt Romney’s plan to shut the Department of Housing and Urban Development; Jeffrey Goldberg on the space shuttle; Ramesh Ponnuru on the Buffett rule and David Crane on California’s rising taxes.

To contact the writer of this article: Enrique Krauze at ekrauze@prodigy.net.mx

To contact the editor responsible for this article: Max Berley at mberley@bloomberg.net