When Enrique Peña Nieto became president of Mexico in December 2012, there was considerable hope that the violence that had roiled that country so badly over the previous six years might subside. Peña Nieto seemed determined to adopt a different approach than his predecessor, Felipe Calderón, to the problems of drug trafficking and organized crime. Calderón had used the military to wage open warfare on the country’s powerful drug cartels during his presidency, and the results were calamitous. More than 60,000 perished in drug-related violence during those years, and at least another 25,000 disappeared under mysterious circumstances.

Early in his presidency, Peña Nieto de-emphasized the confrontational strategy, returning to the more ambivalent posture toward drug trafficking that the Mexican government had maintained throughout the decades before Calderón’s escalation. And for a time, that lower-key approach seemed to work. Although violence between rival cartels—and between various cartels and the government—did not disappear, it did subside. That was especially true in Ciudad Juárez, Nuevo Laredo, Tijuana and other cities on the border with the United States, which had been the epicenters of bloodshed during Calderón’s administration.

But the encouraging trend has reversed in an alarming fashion in recent months. Although some once-dominant trafficking organizations, such as the Gulf Cartel and La Familia, have faded or disappeared entirely, new and equally ruthless competitors have taken their place. Among the latter are the Knights Templar and Los Viagras. Vigilante groups, which have been on the rise for several years as government forces seemed unable or unwilling to maintain order and defeat the cartels, have gained even greater prominence since mid-2014. The spike in vigilantism is especially troubling because it reflects a growing lack of public confidence in Mexico’s police and criminal-justice systems.

(Recommended: 6 Best U.S. Presidents of All Time)

Unfortunately, there are ample reasons for that lack of confidence. Mexico has long been afflicted by pervasive corruption, with drug cartels and other criminal organizations easily penetrating governmental institutions. But developments over the past few months suggest that some of those institutions do not merely exhibit mundane corruption, but may be compromised in horrific ways.

(Recommended: 5 Worst U.S. Presidents of All Time)

The most troubling incident took place in September 2014, when students from a teachers college disappeared in the western state of Guerrero. The students had shown the temerity to conduct a protest demonstration against the mayor of Iguala and his wife. Evidence soon emerged that the students were likely murdered and their bodies burned. Worse, there are strong indications, including eyewitness accounts from two individuals who survived the attack, that elements of both the police and the army, along with enforcers from a local drug cartel, were responsible for the massacre.

(Recommended: 5 ISIS Weapons of War America Should Fear)

The ensuing scandal is rocking Peña Nieto’s administration, as angry demonstrators in several cities have demanded his resignation. Concerns that Mexico might become a “failed state”—which had gained traction during the most turbulent years of Calderón’s presidency—are again on the rise. Such concerns are excessive, since Mexico has an array of powerful institutions ranging from the Catholic Church to well-organized political parties to a significant (and growing) legal business community. Mexico is not Somalia, Bosnia, Yemen, Sudan or other failed states, where such stabilizing features are largely absent; nor is it fractured by bitter ideological or religious conflicts, as those countries have been.

(Recommended: 5 Israeli Weapons of War ISIS Should Fear)

Nevertheless, the recent developments are worrisome. Overall, the drug cartels remain as powerful and ruthless as ever, and some of those organizations are branching out into human trafficking, the hijacking of oil shipments, extortion and other criminal activities to augment their income from the drug trade. Although the challenge they pose to the authority of the Mexican government may have become less blatant during Peña Nieto’s administration, such groups remain very powerful players, and in some areas of the country verge on constituting a “parallel government.”

Equally troubling is the phenomenon of vigilantism from an angry, disgusted population. The awful Guerrero episode will certainly not contribute to any restoration of public confidence in the country’s governmental institutions. Mexico’s police, court system and even the military are riddled with corruption, and the public’s willingness to tolerate that situation is clearly diminishing.

Peña Nieto has exhibited good judgment in abandoning his predecessor’s counterproductive strategy of open warfare against drug-trafficking organizations. He has also shown a refreshing willingness to begin opening Mexico’s economic system of crony capitalism to badly needed free-market reforms. But for Mexico to reach its potential as a modern, well-governed country, he must take steps to stem the corrosive effects of institutional corruption. The Guerrero massacre and its ongoing blowback is a warning of what may happen if he does not take decisive action on that front.

And the United States does not have the luxury of being an indifferent spectator to a new surge of turbulence in Mexico. Instability on our southern border is inherently a national-security issue, since it would exacerbate illegal immigration, the spillover of drug-related violence into the United States and an assortment of other problems. The Obama administration needs to pay more attention to troubling developments in America’s own neighborhood instead of trying to micromanage situations and dictate outcomes in the Middle East, Ukraine, the South China Sea and other distant regions.

Ted Galen Carpenter, a senior fellow at the Cato Institute and a contributing editor at The National Interest, is the author of nine books, including The Fire Next Door: Mexico’s Drug Violence and the Danger to America (2012).

Image: Wikimedia Commons/Thelmadatter/CC by-sa 3.0