Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

What does a crime-wracked city do if its most effective strategy against gun violence has also fueled allegations of abuse and corruption?

The answer, in Baltimore, is to try again ─ but this time, more carefully.

Frustrated by the city’s stubbornly high murder rate ─ including a record-setting 2017 ─ Mayor Catherine Pugh fired her police commissioner Friday and replaced him with a career Baltimore cop who promised to expand upon prior efforts at “hot spot policing.”

Baltimore, along with many other big American cities, has a complicated relationship with the tactic, which involves flooding high-crime neighborhoods with officers who target the most violent or chronic offenders. It has proven to curb gun violence, but at a steep price.

Baltimore's version of hot spot policing has forced the city into costly settlements with people alleging violations of their civil rights ─ as documented by The Baltimore Sun. One unit, called the Gun Trace Task Force, turned out to be corrupt. And a detective who planned to testify against members of that unit was shot to death in November. That case remains unsolved.

Related: Baltimore Detective Sean Suiter killed day before testimony in police corruption case

But in its new emphasis on hot spot policing, Baltimore is being watched by the federal government. The police department, under threat of a civil rights lawsuit by the Justice Department, has promised to change the way it operates, a result of an investigation that began with the April 2015 death of Freddie Gray from injuries sustained while in police custody. Gray’s death set off riots in the city, which were followed by a federal investigation documenting a pattern of unconstitutional stops and searches that eroded trust in the neighborhoods suffering the worst violence.

An officer walks behind a police line near the scene of the shooting death of Baltimore Police detective Sean Suiter in Baltimore, on Nov. 17, 2017. Patrick Semansky / AP file

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

After consulting with the Justice Department, Pugh said she has hired a guru of the modern hot spot policing movement: Sean Malinowski, a Los Angeles Police Department commander who advises cities on high-tech policing techniques, including the use of precinct-based “nerve centers” outfitted with software that helps officers predict where shootings will occur. That approach has been credited with Los Angeles' long-term drop in crime, and recent crime reductions in some of Chicago's troubled neighborhoods.

This strategy is a modern iteration of the type of hot spot policing that grew popular during the 1980s, with officers plotting crimes with pins on maps, and expanded in the 1990s and 2000s with computerized Compstat crime-analytics programs. With advances in technology came the use of predictive policing software. Today's versions, including those embraced by Malinowski, rely on the rapid crunching of crime data, along with the use of surveillance cameras and sensors that alert police to the sound of gunfire, and downloading that information to officers' smartphones.

Related: Trump objections don’t stop overhaul of Baltimore police after Freddie Gray death

Bill Bratton, the former police commissioner in New York ─ where he introduced the Compstat in 1994 ─ and Los Angeles ─ where he had Malinowski develop predictive policing programs ─ said in an interview that the latest version was "Compstat on steroids."

"We’ve moved forward to the point where we're using algorithms to identify the where, when and who with much more accuracy," Bratton said.

The history of hot spot policing ─ an outgrowth of the "broken windows" philosophy of policing that gave rise to stop-and-frisk techniques ─ is also a tale of the perils of aggressive street enforcement. Several of America's biggest cities, including New York, Los Angeles and Chicago, have used tactics that have been found to be unconstitutional for disproportionately targeting minorities. That has sown enmity in black and Latino communities.

Police leading the new iterations of hot spot policing stress the importance of maintaining community trust. In fact, some say that the modern version reduces the overall number of enforcement interactions police have with people on the street.

Related: Baltimore police commissioner Kevin Davis replaced by mayor amid record murder rate

Bratton likened the application of hot spot policing to a doctor tending to a patient.

"Policing and policing strategies are like medicine ─ you have to know how much to apply and when to apply. If not, you overdose," he said.

Baltimore Police Department Commissioner Kevin Davis, who was fired on Friday, spoke in November with Mayor Catherine Pugh. Patrick Semansky / AP file

In Baltimore's case, hot spot policing has been shown to curb gun violence. A study by Johns Hopkins Center for Gun Policy and Research released last week concluded that special units targeting violence and guns in high-crime areas suppressed the number of shootings. But the researchers also noted that many of the units that performed those duties ran into legal trouble.

"Without sufficient professionalism, oversight and accountability, such units can cause serious harm to individuals in the communities they are supposed to protect and to the department’s reputation, undermining its long-term effectiveness," the researchers wrote.

Baltimore’s new top cop, Darryl DeSousa, who'd served as an assistant commissioner under his predecessor, Kevin Davis, balanced tough talk for criminals with a promise to keep civil rights issues in mind.

Mayor Catherine Pugh listens as new Baltimore police commissioner Darryl DeSousa speaks at a news conference, on Jan. 19, 2018 in Baltimore. Kim Hairston / The Baltimore Sun via AP

"I have a real strong message for the trigger pullers: It’s that we’re coming after them," DeSousa said Friday at a news conference. "It’s going to be accelerated pace. The district commanders in all nine districts know who they are, and we’re coming after them. And I want to let everybody know it’s going to be done in a constitutional manner."

Andrew Ferguson, who studies predictive policing at the University of the District of Columbia David A. Clarke School of Law, said he thinks highly of Malinowski and his approach to hot spot policing. But its success will hinge on whether Baltimore is able to do what it takes to make it work.

"Are they going to invest resources into it? They spent real money in L.A. and Chicago," Ferguson said.

The Baltimore Police Department did not respond to requests for details on DeSousa's plan.