THERE have been gunfights outside the American school and a big private university. The mayors of two suburbs have been murdered. And a grenade has been thrown at Saturday evening strollers in a square, injuring 12. All this has happened since August not in Kabul or Baghdad but in Monterrey in northern Mexico (see article). The latest battleground in a multilateral war between drug-trafficking gangs and the authorities, Monterrey is not a dusty outpost. It is one of the biggest industrial cities of North America, a couple of hours' drive from Texas and home to some of Mexico's leading companies.

The maelstrom of drug-related violence that is engulfing Mexico has produced exaggerated, sometimes xenophobic, alarm in parts of the United States. The response in Mexico City has, until recently, been defensive denial.

Both reactions are wrong. The violence, in which at least 28,000 people have been killed since 2006, reflects a double failure of public policy: decades of neglect of the basic institutions of the rule of law in Mexico, and a failed approach to drug consumption (plus lax gun laws) in the United States. These mistakes have helped to create the world's most powerful organised-crime syndicates. Reforms in both countries could help tame them.

Take Mexico first. For much of the long rule of the Institutional Revolutionary Party until 2000, the goal of policing was political control rather than crime prevention or detection, and the judiciary acted as a rubber stamp. In these conditions the drug gangs thrived. With increasing urgency the past three Mexican presidents have tried to tackle the mobsters, but have found they lacked the tools for the job. Thus, on taking over as president in 2006, Felipe Calderón turned to the army as a stopgap, sending thousands of troops onto the streets of northern cities. Only now, and with painful slowness, are the elements of a broader strategy falling into place. The new federal police force is growing, but it remains too small. Belatedly, the government has realised that it needs to pursue more active social policies to ensure that young men do not see the drug business as their only career option.

Perhaps the best news is that the mayhem in Monterrey has at last forced Mexico's politicians and business leaders to face up to the gravity of the threat. Mr Calderón sent a constitutional amendment to Congress this month that would consolidate more than 1,600 local police bodies into 32 reformed and strengthened state forces. It now stands a decent chance of being swiftly approved. Even then, Mexico's long to-do list includes regaining control of local prisons and local courts.

In all this Mexico is not getting the right kind of help from the United States. Weak law enforcement in Mexico has helped the drug gangs to grow, but their power owes everything to proximity to the world's largest retail market for illegal drugs. Recent American administrations have at least moved on from the finger-pointing of the past to an acceptance of shared responsibility. But the results are patchy. The Mérida Initiative, a $1.4 billion anti-drug programme for Mexico, is lazily modelled on Plan Colombia. It includes a lot of helicopters and hardware of the kind Colombia needed to fight FARC narcoguerrillas, when what Mexico really needs is far more support with police training and intelligence-gathering.

Mexico would be even better served if the United States renewed a ban on the sale of assault weapons that lapsed in 2004. Sadly, this looks unlikely to happen. Yet since 2006 alone, Mexican authorities have seized 55,000 of these weapons of war. That is enough to equip many NATO armies—and most were bought legally in American gunshops.

The potential of pot

So permissive when it comes to lethal weapons, the United States remains steadfast in its commitment to the prohibition of drugs, in the face of all the evidence that this policy fails to curb their consumption while creating vast profits for organised crime. It is welcome that California is now debating before a referendum on November 2nd, whether to legalise marijuana (see article). This newspaper would vote for the proposition, because we believe that drug addiction, like alcoholism and tobacco consumption, is properly a matter of public health rather than the criminal law.

If California votes in favour of legalisation, Mexico would be wise to follow suit (the bottom would anyway fall out of its marijuana business). The drug gangs would still be left with more lucrative cocaine and methamphetamines. But it would become easier to defeat them. And Mexicans should make no mistake: they must be defeated. The idea of going back to a tacit bargain that tolerates organised crime, favoured by some in Mexico, is inimical to the rule of law, and thus to democracy and a free society. The sooner Mexico turns its new-found sense of urgency into a more effective national policing and law-enforcement strategy the better.