WILLIAM BRATTON, the chief of the Los Angeles Police Department (LAPD), likes to say that “cops count”. They certainly seem to count when Mr Bratton is in charge of them. New York's crime rate withered when he ran its police force in the mid-1990s, and Los Angeles has become more law-abiding ever since he arrived in 2002. Burglaries are down by a fifth, murders by a third and serious assaults by more than half. The setting for innumerable hard-boiled detective novels and violent television dramas is now safer than Salt Lake City in Utah.

Yet Los Angeles's good fortune is not replicated everywhere. Compared to ten years ago, when crime was in remission across America, the current diagnosis is complex and worrying. Figures released this week by the FBI show that, while property crimes continue to fall, the number of violent crimes has begun to drift upwards. In some places it has soared. Oakland, in northern California, had 145 murders last year—more than half again as many as in 2005. No fewer than 406 people died in Philadelphia, putting the murder rate back where it had been in the bad old days of the early 1990s.

The most consistent and striking trend of the past few years is a benign one. America's three biggest cities are becoming safer. Robberies in Chicago, Los Angeles and New York have tumbled in the past few years, defying the national trend (see chart). Indeed, the big cities are now holding down increases in overall crime rates. Between 2000 and 2006, for example, the number of murders in America went up by 7%. Were it not for Chicago, Los Angeles and New York, all of which notched many fewer, the increase would have been 11%.

This is especially surprising given the big cities' recent woes. Thanks to a cut in starting salaries and poaching by suburban forces, New York's police department has lost more than 4,000 officers since 2000. Chicago and Los Angeles also have fewer cops than they did in the late 1990s—and the latter has more people. The LAPD labours under a court decree, imposed in 2001 following revelations of corruption and brutality, which forces it to spend precious time and money scrutinising itself.

The three police forces, though, look increasingly alike when it comes to methods of tackling crime. The new model was pioneered in New York. In the mid-1990s it began to map crimes, allocate officers accordingly (a strategy known as “putting cops on the dots”) and hold local commanders accountable for crime on their turf. Since 2002 it has flooded high-crime areas with newly qualified officers. The cops' methods are sometimes crude—police stops in New York have increased five-fold in the past five years—but highly effective. Crime tends to go down by about a third in the flooded areas, which has a disproportionate impact on the overall tally.

In the past few years Chicago and Los Angeles have adopted similar methods: although, having fewer officers, they are less extravagant with them. The Los Angeles police targeted just five hot spots last year. But both cities have put local commanders in charge of cutting crime on their patches. And, like New York, they are moving beyond putting cops on the dots. They now try to anticipate where crimes will occur based on gang intelligence.

Wesley Skogan, a criminologist at Northwestern University, reckons such methods are the most likely cause of the continued drop in big-city crime. He has diligently tested most of the explanations proffered for Chicago's falling crime rate and has been able to rubbish most of them. Locking lots of people up, for example, may well have helped cut crime a decade ago. But it can't account for the trend of the past few years: the number of Chicagoans behind bars has declined since 1999. The police simply seem to be doing a better job of deterring lawlessness.

The big cities' methods may sound obvious, yet they are surprisingly rare. Many police forces are not divided into neighbourhood units. Oakland's struggling force, for example, is organised into three daily shifts, or “watches”, which makes it hard to hold anybody accountable for steadily rising crime in a district. Even when smaller police forces track emerging hot spots, they often fail to move quickly enough to cool them down.

There is, however, a limit to what even the best police forces can do. Outside New York, in particular, the thin blue line can be very thin indeed. Los Angeles, a city of 3.8m people, tends to have about 500 officers on general patrol at any time. However shrewdly the cops are deployed, they might not have cut crime so dramatically if social trends had not also been moving in the right direction.

The most obvious change is that, thanks in part to high property prices, all three cities are shedding young people. Together they lost more than 200,000 15-to 24-year-olds between 2000 and 2005. That bodes ill for their creativity and future competitiveness, but it is good news for the police. Young people are not just more likely to commit crimes. Thanks to their habit of walking around at night and their taste for portable electronic gizmos, they are also more likely to become its targets.

Another change is that poor Americans have been displaced by poor immigrants—who, as studies have repeatedly shown, are much better behaved than natives of similar means. This trend is symbolised by the disappearance of blacks. Roughly half of America's murder victims and about the same proportion of suspected murderers are black. In five years America's three biggest cities lost almost a tenth of their black residents, while elsewhere in America their numbers held steady.

None of which detracts from the achievement of America's biggest police forces. After all, they managed to cut crime when several trends, from the growing availability of crack cocaine to the continued breakdown of poor families, were against them. It is nice to have some help, but cops do count.