Enrique Krauze, editor of the magazine Letras Libres, is most recently the author of “Redeemers: Ideas and Power in Latin America.” This column was translated by Hank Heifetz.

MEXICO CITY

On Sunday, about 45 million Mexicans (roughly 60 percent of eligible voters in a population of 110 million) are expected to choose their next president. Most polls predict that the winner will be Enrique Peña Nieto, the young candidate of an old party, the PRI, that is often associated with the image of a dinosaur. Unless there is a major upset — which would probably be in favor of Andrés Manuel López Obrador, the left candidate — many Mexicans will ponder two questions: Will we see the restoration of the old regime, which Mario Vargas Llosa once called “the perfect dictatorship”? And will the next government basically alter President Felipe Calderón’s strategies to fight the drug trade and organized crime? The answer to both seems to be a qualified no.

Vargas Llosa was right about the past. The Institutional Revolutionary Party, or PRI, functioned for decades like a well-oiled machine, only occasionally feeling the need for physical or ideological coercion. Every six years, the outgoing president, who wielded absolute power, selected his successor. The “system” gave the country stability, order and growth, all at the cost of political development. It engendered theft and generalized corruption and a cancer that grew invisibly within the social body: governmental complicity with the growing drug trade. Mexico was a monarchy in democratic disguise.

But the “perfect dictatorship” died in the 2000 presidential election, with the PRI’s loss of power after more than 70 years. Mexico changed. The president now exercises only his prescribed constitutional powers. We have a multi-party congress and an independent Supreme Court. A transparency law has reduced free-wheeling corruption at the federal level. There is absolute freedom of expression. The government no longer organizes and controls elections; they are regulated by a federal institute of citizens. The Bank of Mexico is autonomous.

In short, a return to the days of the “perfect dictatorship” is impossible.

But this doesn’t mean that the PRI has become a modern party. Its dinosaurs have taken shelter in state governments and in gigantic public unions such as the oilworkers union (whose leaders have become, in large part, proprietors of this public industry). Monopolies, public and private, have also survived. Peña Nieto has spoken of “a renovated PRI,” but he has not explained how he would dismantle these remaining structures and practices.

To combat poverty, Mexico’s economy needs to grow at an accelerated rate. Current annual growth, at 3.9 percent, is passable but insufficient. Structural reforms, such as opening the declining petroleum sector to external investment and some deregulation of overly rigid labor laws, are needed. These moves would threaten the dinosaur mentality, which has always relied heavily on patronage. Political reform such as permitting the reelection of congressmen, senators and mayors, all of whom are limited to one term, would make them subject to future political accountability.

It is not clear that Peña Nieto has the political will and persuasive leadership to confront these public and private monopolies. And he may have to deal with immediate unrest in the streets from those furiously opposed to the return of the PRI. They may claim fraud, to seek an annulment of the election. Will Mexico process such differences without descending into political violence? I hope and trust that we can.

But it is another kind of violence, by the narcos and other criminals, that most concerns the population. In some states, criminal groups aim at controlling local governments, and photos and descriptions of terrible crimes pervade the newspapers and social media.

In the past, the government could combat criminal violence through harshly authoritarian means not acceptable or possible in a democracy. But along with all its benefits, democracy brought one paradoxical result. By decentralizing control, it strengthened local power, which also benefited local criminals and facilitated alliances between corrupt police and the narcos. Reform of our police system, which is critical, will require cultivating increased professionalism and honesty. One of the PRI’s most sordid accomplishments was its use of various police forces as a repressive arm of the system, rather than as protectors of the people. During Calderón’s six-year term, 30,000 professionally trained police were added to federal forces. We need many more capable and honest officers, and Peña Nieto has said that, if elected, he will make this expansion (and, presumably, purification) of the police one of his first priorities.

Mexico’s problems are immense, but international opinion has at times been too harsh with my country in recent years. After weathering a number of economic crises, we have learned to manage our finances and improved public health programs and aid to the needy. It took Western democracies centuries to establish their systems. With no real previous experience, we have made giant strides in just a few years.

Major improvements are still needed in education and various social programs. In fighting drug traffickers Mexico would benefit from greater U.S. cooperation in gathering information, and Mexico must take better control of its border and jails.

Whatever happens Sunday, Mexico has seen the genuine and irreversible advance of democracy. All of these difficult moves became possible only because of the changes since 2000.