The sharp spike in homicides and shootings in Baltimore City since the unrest sparked by Freddie Gray's death in police custody last year has left police and prosecutors scrambling to contain the violence. Many of the people involved in such crimes are well known to police, who are frustrated by their inability to bring them to justice or secure convictions carrying lengthy prison terms. Why is it so hard for the authorities to get such people off the streets — and keep them off?

Experts say most gun crimes are committed by a relatively small number of people, the repeat violent offenders whom Police Commissioner Kevin Davis calls "trigger pullers." These suspects are skillful at evading the law and terrorizing the neighborhoods where they operate with virtual impunity. David Warren, the 24-year-old who was charged this month in connection with the shooting of five people at a Memorial Day cookout, had a long record of arrests for multiple attempted murders and gun violations. But he was never convicted of those violent crimes.


And Mr. Warren, whose street name was "The Grim Reaper," isn't an aberration. There are hundreds of men like him on the streets of Baltimore because prosecutors and police were never able to build solid cases against them or because witnesses refused to testify against them in court.

Solothal "Itchy Man" Thomas, the notorious West Baltimore hit man who was finally sentenced to life in prison on a murder conviction in 2006, had been charged in state court with killing two people and attempting to kill a dozen more in his work as an "enforcer" for a large drug organization. But each time, he won acquittals or pleaded guilty to lesser charges that carried relatively short prison stints.

That is why if the killing is to stop, police and prosecutors must adopt smarter strategies to identify shooters and figure out how to deal with them. Many cases are lost as a result of incomplete or flawed investigations by police, oversights by prosecutors and a lack of cooperation from witnesses too afraid to speak out. They all add up to a system in which justice too often is delayed or denied and people lose confidence in the ability of law-enforcement to protect them.

Police, for example, can err in critical phases of investigations by mishandling evidence or running afoul of the Fourth Amendment in conducting searches and taking statement from defendants in ways that make them inadmissible in court. Officers also need more expertise in collecting data from suspects' phones, social media sites, messages and contacts. Police are still grappling with issues posed by the use of body cameras and videotaped statements. These errors could be minimized with better and more frequent training but so far the city hasn't made the investments that would require.

Prosecutors also face serious challenges. Over the past six years the state's attorney's office has experienced a number of shakeups and political changes in leadership that have affected prosecutors' ability to do their jobs. It takes time to build up a staff of experienced litigators who can be successful prosecuting cases like Mr. Warren's and that can't happen when there is continual turnover in the office and departures of seasoned employees.

That also affects prosecutors' ability to get witnesses to come forward and then stick with a case through to its conclusion. Prosecutors cite so-called "witness fatigue" — the interminable delays caused by postponements, changes of venue, discovery motions and other legal hurdles — that can cause even relatively straightforward cases to drag on for years.

Police and prosecutors know that just the prospect of a lengthy legal process can discourage people from reporting crime at all because they don't feel it's worth the time and inconvenience of seeking justice through the courts. And that's not just because of the so-called "stop snitching" culture roundly condemned by authorities. It's because people have real concerns about missed work, child care, transportation and their personal safety. The criminals know that, and also that time is on their side even if witnesses do decide to cooperate with authorities.

Some of these issues could be resolved through the mayor's Office of Criminal Justice, which includes representatives of the police department, the courts, the public defender's office and the prosecutor's office to coordinate the city's crime-fighting effort. That's where more effective strategies to make the system work better should be coming from. But even that mechanism now seems broken. The current mayor and her successor need to fix it because the violent repeat offenders responsible for so much of the city's gun violence aren't going anywhere until prosecutors and police figure out how to beat them at their own game.