ON ONE side of a low hill in the middle of Monterrey, Mexico’s biggest industrial city, lies Independencia, a district so run down that donkeys still carry heavy goods to the top. On the other side is San Pedro Garza García, one of Latin America’s most affluent neighbourhoods and home to some of its biggest companies.

In the past four years, the yawning social divide between them has been bridged by violence. First, the sound of gun battles between drug gangs fighting in Independencia carried over the hill to the mansions of San Pedro. Then the killings began in San Pedro itself. In a place once considered by its residents to be safer than Texas, just a few hours’ drive away, murders, carjackings and extortion became everyday occurrences. Some rich families fled to Texas—and were branded as “cowards” by Lorenzo Zambrano, the boss of Cemex, a cement-maker which is one of Monterrey’s (and Mexico’s) biggest firms.

The trauma eventually brought about a more constructive reaction. “Society was passive, permissive and in some cases even complacent,” says Maurico Doehner, a manager at Cemex whose landscaped headquarters lies in the heart of San Pedro. “There was a broken link between the authorities and the ordinary citizens, and we had to overcome that.”

Almost three years after Mr Zambrano’s outburst, Monterrey is starting to put the worst behind it, thanks in part to co-operation between the government of the state of Nuevo León (of which Monterrey is the capital) and the city’s industrialists. The number of murders is still well above the long-run average, but their incidence has plunged recently. Violent car theft—gangs steal cars to carry out other crimes—fell from 45 a day in July 2011 to just over four a day in April. The authorities claim that local leaders of the Zetas, one of Mexico’s most-feared drug mobs, are now largely on the run, in jail or dead.

The private sector has helped the government, with both money and technical expertise, to recruit and run a new police force. The first task was to purge state and local police of infiltration by drug mafias. Rodrigo Medina, Nuevo León’s governor, says 4,200 police were fired or jailed after failing lie-detector and other tests. At first the armed forces (mainly marines) were drafted in to keep order. Then, with advice from the human-resources departments of Monterrey’s biggest firms, the government launched a national recruitment drive to build a new state police force, known as Fuerza Civil (civil force).

This is made up of people who have never worked in law-enforcement before. Recruits were given business-style psychometric tests as well as military training. Their starting pay of more than 15,000 pesos ($1,175) a month is about double what a normal cop makes. The new policemen are housed in secure compounds that make it difficult for drug mafias to nobble them. The smartly dressed recruits patrol Monterrey in jeeps. Surveys suggest they enjoy the trust of citizens.

A business group has set up a monitoring system, collecting data to compare security in Monterrey’s nine municipalities. Some firms have helped to finance a network, known as the Centre of Citizen Integration, to encourage people to report crimes—even those committed by the police or army. It has helped people overcome their huge mistrust of those who are supposed to protect them.

The new partnership was strained when Mr Medina’s government raised a payroll tax from 2% to 3% this year, mainly to expand Fuerza Civil from 3,300 to 7,000 officers by 2015, according to Jorge Domene, the government’s chief of staff. Businessmen complain that the money is being misspent on a bloated, debt-ridden public sector. Mr Domene rejects the criticism, saying the tax is aimed at raising an extra 1.6 billion pesos a year, which will allow Fuerza Civil’s budget of about 800m pesos to be doubled. In turn, he chides businesses as skinflints. “We are very grateful to them, but in the past two years they haven’t spent more than 100m pesos on security,” he says.

Pedro Torres, a crime expert at Monterrey’s Institute of Technology, says some features unique to Nuevo León have contributed to the fall in crime, which may make the experience harder to replicate elsewhere. Monterrey’s private sector is a powerful “balance” to the government, he says; its voice is heard when it speaks up. The city has robust media and its universities are independent and influential.

Monterrey may offer lessons for Mexico City, where crime was traditionally low because of saturation policing. But last month 12 young people were kidnapped from a nightclub in the Zona Rosa, in the city centre. Two are reported to be the sons of gangsters alleged to control the city’s retail drug trade.

Consolidating security in Monterrey will mean offering better jobs and education to young people in poor neighbourhoods like Independencia, so that they shun violent crime. It is too early to declare victory: in the once-cool Barrio Antiguo in the city centre, many bars that suffered frequent shoot-outs remain boarded up. But in San Pedro nightlife is once again buzzing. And in Independencia, Zeta graffiti has been painted over with vibrant murals saying: “I see peace, I am peace.”