THE manhunt lasted for more than three weeks. Some 1,300 heavily armed officers, with dogs and night-vision gear, prowled the damp woods of upstate New York in search of two murderers who had escaped from a state maximum-security prison on June 6th. The search is said to have cost around $1m a day. At last, on June 28th, the drama ended: David Sweat, the younger fugitive, was shot and arrested two days after a federal agent killed his co-conspirator, Richard Matt, in the woods near the Canadian border.

So these two killers, at least, are off the streets; but many more still roam the country with impunity. America’s homicide clearance rate—the percentage of solved crimes that lead to arrest—has fallen considerably in the past 50 years, from around 90% in 1965 to around 64% in 2012, according to federal statistics. This means more than 211,000 homicides committed since 1980 remain unsolved. Every year introduces nearly 5,000 more.

The fact that so many people are getting away with murder is partly the result of good news. Homicides in America have dropped by nearly a third since 1990. Fatal crimes of passion, which tend to be easier to solve, have plummeted just as quickly. The murders that are left—around 14,500 each year—tend to be harder to clear up, as they often involve gangs or organised crime where witnesses are scared.

A closer look at the numbers, however, reveals big discrepancies between cities. Some, such as Houston and San Diego, have managed to raise their rates to between 75% and 90% in recent years. Others, such as Detroit and New Orleans, solve less than 30%. Charles Wellford, a criminologist at the University of Maryland, also notes that murders of police officers are nearly always solved, anywhere. Perhaps, he suggests, “any homicide can be solved if you put the time into it.”

Many law-enforcement officials blame their low clearance rates on limited resources and lack of gear. But getting better results “doesn’t have to cost that much money”, says David Carter, a criminologist at Michigan State University. In a Department of Justice study of police departments with some of the highest clearance rates, he found that the most essential characteristics were trusting relationships with locals and good teamwork. Though television dramas tend to depict wizened sleuths solving crimes alone or in pairs, the most effective departments co-operate and communicate widely. The most costly part of any investigation, Mr Carter notes, is the overtime that must be paid to investigators in the first 48 to 72 hours after a homicide is discovered.

Changing the culture of a homicide-investigation unit is often hard. But the effect can be powerful. Richmond, Virginia, for example, had a serious problem with gang violence in the mid-1990s, and a homicide-clearance rate just north of 50%. The police department then built better relationships with locals and sent more officers to areas with higher rates of crime. From a peak of 160 murders in 1994, the city saw 37 in 2013, 27 of which have been solved.