The Trump administration will try to scuttle the deal Chicago reached to set new limits on the city’s police powers, Attorney General Jeff Sessions said Tuesday, adding that the consent decree reached under the Obama administration would leave residents more vulnerable to crime.

The Justice Department will file a statement of interest this week asking a judge to reject the consent decree, marking another escalation of the battle between President Trump and Chicago, hometown of former President Barack Obama and a hotbed of anti-Trump resistance.

The new agreement, which Chicago reached with the Illinois attorney general’s office, would limit how and when officers could use force, require more training, supervision and transparency, and create an independent monitor to judge whether city police are living up to the deal.

Mr. Sessions said the city was ill-served by a consent agreement reached in 2015 by Chicago and the American Civil Liberties Union. Under that deal, the city agreed to end street-level enforcement tactics such as stop-and-frisk. The attorney general said that led to a surge in gun-fueled homicides.

“It is imperative that the city not repeat the mistakes of the past — the safety of Chicago depends on it,” Mr. Sessions said. “Accordingly, at the end of this week, the Justice Department will file a statement of interest opposing the proposed consent decree. It is critical that Chicago get this right.”

A spokesman for Chicago Mayor Rahm Emanuel said the consent decree has public safety benefits and included input from the public and police officers.

“There they go again. The Trump administration never ceases to amaze, and this is just further proof that they are out of step with the people of Chicago and out of touch with reality,” mayoral spokesman Matt McGrath said in a statement. “And if anyone in the Trump administration was paying attention they would know that as we have made major reforms over the past two years, we have also driven a 30 percent reduction in gun violence.”

A hearing on the proposed decree is scheduled for later this month in a federal court in Chicago.

Mr. Trump on Monday hinted at action, telling the International Association of Chiefs of Police that he had directed Mr. Sessions “to help straighten out the terrible shooting wave.” He said the 2015 agreement to end stop-and-frisk was terrible and urged city leaders to reverse the policy and let officers use the tactic again.

“It works, and it was meant for problems like Chicago,” Mr. Trump said.

Critics say stop-and-frisk is a form of racial profiling, and a federal judge declared it unconstitutional in 2013.

The mayor’s spokesman also rejected Mr. Trump’s call to restore the practice and pointed to improvements this year in the city’s homicide and shooting rates.

“Even someone as clueless as Donald Trump has to know stop-and-frisk is simply not the solution to crime,” Mr. McGrath said in a statement to The Washington Times. “The fact that he’s trotting out this tired rhetoric is another sign he’s worried about Republicans in midterms.”

Policing is only the latest battle between the Trump administration and Chicago, which helped pioneer sanctuary immigration policies and is battling — and winning — against Mr. Sessions’ attempted sanctuary crackdown.

Mr. Sessions has also been an ardent critic of consent decrees constraining police, tying them to crime increases.

In the case of Chicago, the agreement sprung from an Obama-era Justice Department investigation that accused city police of excessive force, racially discriminatory policies and failing to investigate claims lodged by citizens.

The Obama-era report was prompted by the death of Laquan McDonald, a black 17-year-old who was shot in the back 16 times as he walked away from officers in 2014. In 2016, a judge ordered the release of dashboard camera footage that contradicted officers’ accounts of the shooting.

After the report, Illinois Attorney General Lisa Madigan filed a federal lawsuit against the Chicago police. Ms. Madigan and Mr. Emanuel, who served as Mr. Obama’s chief of staff before winning the mayorship, worked to draft the settlement.

Martin Prieb, a spokesman for the Chicago Fraternal Order of Police, said the Obama administration investigation and subsequent lawsuit were more about politics than public safety.

“The DOJ under Obama was unfair and politicized against our police department,” Mr. Prieb said. “We feel the conclusions of the investigation were not legitimate because it was a ludicrous investigation that began with the conclusions already drawn to push more control over the police department.”

He welcomed Mr. Sessions’ efforts to thwart the consent decree.

“The good cops in this city feel like they are under siege,” he said. “Now police officers think that if they do their job and do it right, they could still find themselves disciplined, terminated or indicted, and that’s a recipe for disaster. I hope Mr. Sessions will take a closer look at Chicago and see that the police are getting attacked from every corner.”