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

BALTIMORE — A federal judge has approved an agreement negotiated under the Obama administration to overhaul the troubled Baltimore police force, sweeping aside objections from the Trump Justice Department.

President Donald Trump's attorney general, Jeff Sessions, promptly warned that the agreement may result in "a less safe city."

U.S. District Judge James Bredar signed the so-called consent decree Friday, a day after a hearing to solicit comments from Baltimore residents, calling the plan "comprehensive, detailed and precise."

He denied a request to delay the signing to give the Trump administration more time to review the agreement. At Thursday's hearing, a Justice Department attorney expressed "grave concerns" about the plan, aimed at rooting out racist practices.

The consent decree was negotiated during the closing days of the Obama administration after a federal investigation found rampant abuse by Baltimore police, including unlawful stops and use of excessive force against black people.

The investigation was prompted by the 2015 death of Freddie Gray, a 25-year-old black man whose neck was broken during a lurching ride in the back of a police van, where he had been left unbuckled, his hands and legs shackled. Gray's death touched off the worst rioting in Baltimore in decades.

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

Related: Cities Don't Want Feds to Pull Back on Police Reform

In a memo made public earlier this week, the Trump Justice Department signaled that it may retreat from the consent decrees that have been put in place in recent years in such cities as Cleveland; Ferguson, Missouri; Miami; and Newark, New Jersey.

Sessions said in a statement Friday that the Baltimore agreement shows "clear departures from many proven principles of good policing that we fear will result in more crime."

"While the Department of Justice continues to fully support police reform in Baltimore, I have grave concerns that some provisions of this decree will reduce the lawful powers of the police department and result in a less safe city," Sessions said.

The Justice Department can appeal the judge's decision, but it would have to show the judge made an error or abused his discretion.

That would be difficult to prove, said Jonathan Smith, a civil rights attorney in the Obama Justice Department who oversaw negotiations with troubled police departments.

Related: Baltimore Agrees to Court-Ordered Police Reforms

Justice Department lawyers also could try to modify the consent decree, but the burden is high, requiring them to show there has been a substantial change in the facts or the law, Smith said.

City officials, including Police Commissioner Kevin Davis, have voiced their support for the agreement. Mayor Catherine Pugh disputed the notion the decree will hurt the fight against crime.

The homicide rate in Baltimore immediately spiked after the riots over Gray's death, leading some residents to accuse officers of taking a hands-off approach for fear of increased scrutiny.

The soaring crime rate has not relented. In the first three months of 2017, the city recorded 79 homicides, compared with 56 for the same period the year before.

Baltimore's agreement calls for additional training for officers and discourages them from arresting people for minor offenses such as traffic infractions or loitering. It also says officers can no longer detain someone simply for being in a high-crime area.