Attorney General Loretta Lynch announced Friday that the Justice Department would investigate the Baltimore police. (Michael Reynolds/European Pressphoto Agency)

In the District, it was a newspaper investigation that found that the city’s police department was the nation’s deadliest. In Cincinnati, it was the riots that ignited after police shot a 19-year-old black man. And in Prince George’s County, it was the canine unit’s excessive attacks and bites.

In Baltimore, it was Freddie Gray.

The Justice Department on Friday launched an investigation of the Baltimore Police Department after Gray, 25, died of injuries he suffered while in police custody. The probe makes Baltimore the ninth municipality in the country — including Ferguson, Mo., and Cleveland — to undergo such a review recently.

As the federal inquiry begins, Baltimore has powerful examples of what the probe and its aftermath could look like, taken from dozens of similar investigations that have been conducted roughly 40 miles from the city and beyond.

“Today, no police department should be surprised by what the Department of Justice is looking for,” said Chuck Wexler, executive director of the Police Executive Research Forum, which has extensively studied such investigations.

The investigation in Baltimore starts just days after Mayor Stephanie Rawlings-Blake (D) requested the civil rights probe and almost two weeks after a riot tore through the city on the day of Gray’s funeral. Gray, who suffered a severe spinal injury, was shackled in the back of a police van but not seat-belted, a violation of department policy. Six police officers have been charged in his death.

In 1999, then-District Police Chief Charles H. Ramsey — like Rawlings-Blake — invited the Justice Department to review his force.

“To have an independent, third party look at how you can improve operations, you emerge a stronger and better department,” said Ramsey, who is now the police commissioner in Philadelphia and is working with the Justice Department’s Office of Community Oriented Policing Services to reform the city’s police. “Having a fresh set of eyes taking a look at the issues is . . . necessary to improve.”

Since such investigations into local police departments began 20 years ago, the Justice Department has commonly found problems with the use of force, bias, or unlawful searches and seizures.

In Prince George’s County, the Justice Department began investigating in 1999 after complaints emerged against the police canine unit. The federal investigation found roughly 800 bites from police dogs over a seven-year period. A year later, the Justice Department launched a broader civil rights review of the agency.

“If it is done properly, it can support real change,” said Joe Wolfinger, a retired FBI agent and a former assistant director for the bureau who monitored the progress of Prince George’s during its Justice Department review.

During the process, the county increased supervision of canine teams and developed a system for reviewing and documenting bite incidents. The county also implemented a new system to internally review police shootings.

“Something must be working, because I haven’t heard any complaints about dogs biting,” a judge told Prince George’s police and federal investigators in 2007.

Federal oversight of Prince George’s police ended in 2009.

The work can be expensive and fraught with tension, and in some places it can last more than a decade. Most municipalities that have undergone such reviews reported spending an average of $1 million annually to implement changes, in addition to infrastructure and technology costs to comply with federal recommendations, according to a report from the Police Executive Research Forum.

Former Cincinnati mayor Charles J. Luken invited the Justice Department to review the police in 2001, when three days of riots roiled the city after a white officer shot Timothy Thomas. The black 19-year-old was killed during an attempted arrest for traffic violations and other misdemeanors.

During the investigation, Cincinnati’s police chief threw out a monitor who was hired to ensure that reforms were taking place, Luken said, and there were several clashes with Justice Department investigators.

It was a hard six years, Luken said, but it was worth it. Complaints to the citizens review board went from more than 200 a month to four, he said. And Cincinnati’s downtown, where the riots occurred, is seeing an economic rebirth. “That would not have been able to occur without the collaborative effort and cooperation that now exists in the city on these important issues,” Luken said.

Required reforms after other investigations have included the installation of dashboard cameras in police cruisers, improved use-of-force training and the implementation of software systems that flag potential problem officers.

Sometimes, the Justice Department finds that no violations occurred. But once the feds leave and reforms take place, the work isn’t over.

“There must be constant vigilance,” Luken said. “It is not that hard to slip back.”

In 2011, the Justice Department returned to Miami to investigate its police department because, despite a civil rights investigation completed in 2006, officer-involved shootings remained a concern.

“Department of Justice investigations are a really important opportunity for police departments and local communities to push forward transformative change,” said Seema Sadanandan, director of policy and advocacy for the ACLU of the Nation’s Capital. “Young black people in the District have an extremely high contact rate” with D.C. police.

The District’s city auditor recently launched a review of use-of-force policies to ensure that the police are still in compliance with the Justice Department’s recommendations.

David Rocah, a lawyer with the ACLU of Maryland, said that while problems with the canine unit in Prince George’s have largely disappeared, “I don’t think anyone who is an outside observer of the police department would say that everything is hunky-dory there.”

Rocah, who used to work in the Justice Department division that conducts civil rights investigations, said there are also broader issues to consider beyond the reform of a single department.

“The act of policing and locking people up and involuntary interfering with their liberty to move about in the world, there is going to be violence or force,” Rocah said. “We need to think way more carefully about when we’re giving police that power. And that isn’t going to be part of a Civil Rights Division investigation.”

Ramsey said he is confident in Baltimore and its police commissioner. “There are challenges, there is no question,” he said. “But I have no doubt that the department will get through it, and they’ll be stronger as a result.”