EXACTLY 200 years ago, in the badlands of southwestern Mexico, rebels fighting Spanish rule drafted the country’s first political charter. The so-called Constitution of Apatzingán of October 22nd 1814 attempted to set out a framework for the rule of law, but it was never adopted; its intellectual author, José María Morelos, was shot by a firing squad a year afterwards.

Many constitutions later, the area round Apatzingán shows how far Mexico still has to go before becoming a law-abiding country. Known as Tierra Caliente (hot land) it has been the scene of a mass abduction and a massacre, both allegedly carried out by state security forces against unarmed civilians. The two atrocities seem serious enough to change the course of President Enrique Peña Nieto’s two-year-old government. Mr Peña has prioritised economic reform, and played down law and order, as the way to modernise Mexico, without admitting that both are equally important. “He had the pieces but he never had the picture of the whole puzzle, and now he’s paying the price,” says Jorge Castañeda, a former foreign minister.

Mexico has been convulsed by the abduction of 43 teacher-trainees on September 26th in the city of Iguala 80 miles (125km) south-west of the capital, allegedly by local police. They are feared dead, though the government says 28 semi-charred corpses found two weeks later near Iguala do not belong to them. The area is a killing ground littered with mass graves and tensions are running high.

On October 13th colleagues, families and supporters of the missing students staged violent protests against the governor of their home state, Guerrero, setting fire to the state government building. Apart from the abductions, especially shocking is the charge that a drug gang in effect ran Iguala, putting in two of its own—a mayor and his wife—who used local police to settle their scores violently with little fear of being caught. One hypothesis, publicly aired by Ángel Aguirre, the embattled Guerrero governor, is that the mayor ordered the attack on the students because he feared they would disrupt a party in which his wife planned to launch her own campaign for mayor. The mayor and his wife are now fugitives, but Mr Aguirre (who is fighting to save his own skin) says many other towns in Guerrero are in the grip of organised crime.

The utter lawlessness of areas within a few hours’ drive of the capital is echoed in an alleged massacre in June, in which soldiers killed 22 suspected criminals in the rural town of Tlatlaya, not far from Iguala. Over the summer, the army insisted the deaths occurred during a shootout. It arrested an officer and seven soldiers in September only after journalists spoke to a witness who said most of the victims were slain after they had been disarmed.

Three heavy words sum up the challenge now facing Mr Peña and Mexico as a whole: impunity, accountability and governability. Mr Castañeda says Mr Peña sent the wrong signal on impunity from the start by failing to investigate the disappearances of 22,000 people in Mexico in the 2006-12 drug war launched by his predecessor, Felipe Calderón, and during his own administration.

Mr Castañeda and others say that past atrocities have been covered up to win support from Mr Calderón’s opposition National Action Party for landmark 2013-14 energy reforms. The ex-minister says that the “whitewash” enables the security forces to believe they can continue to kill without scruple. But impunity goes further than that. Mexicans’ lack of faith in their law-enforcement authorities means that the number of uninvestigated crimes, as well as the total number of crimes, is staggering (see chart). To counter impunity, Mexico needs accountability, says David Shirk, head of the Justice in Mexico project at the University of San Diego, noting that the word does not have an exact Spanish translation (Mexican lawyers use the English word). In 2008 Mexico ushered in a series of bold judicial reforms that aim to improve the legal system. They include reducing the power of the state by introducing adversarial trials that for the first time allow defence lawyers to pick apart publicly the evidence of government prosecutors. They also put the onus on police to do more investigation. Mr Shirk credits Mr Peña with unifying codes of criminal procedures this year so the whole country is governed by the same set of rules. But he says the government has inadequately promoted the new justice system, partly because it has sought to play down any hint of violence that might deter foreign investors. “They don’t seem to understand how important the rule of law is to their economic agenda,” he adds. Some argue that to end violence, Mexico needs to do away with separate police forces in its 32 states and 2,457 municipalities and create a vast unified federal police force. But such a monster could be untamable—especially given the corrupting power of drug money.

Sabino Bastidas, a political analyst, says the problem goes beyond policing to governability: checks and balances on local and state governments are far weaker than at the federal level, meaning that towns are ruled as fiefs. In a system where power brings privilege, and privilege can literally mean getting away with murder, it is not just institutions that may need to change but a whole frame of mind.