A federal judge signed off on a consent decree to reform the troubled Baltimore Police Department on Friday, two years after the death of Freddie Gray sparked violent protests and focused national attention on the city’s law-enforcement problems. It could also be the among the last of its kind for the immediate future.

The consent decree is “is comprehensive, detailed, and precise,” Judge James Bredar wrote in his order approving the draft. “It appears to be balanced and well-calibrated to achieve the parties’ shared, jointly-stated objectives. After close review of the proposed decree, and in light of all other submissions on the docket and in open Court, the Court concludes the decree is fair, adequate, and reasonable.”

In approving the decree, Bredar also denied an 11th-hour request by Justice Department lawyers to delay his decision for 30 days. The request came after Attorney General Jeff Sessions ordered a department-wide review earlier this month of federal oversight efforts of state and local police departments. But Bredar was unwilling to grant the government any delays, telling both parties they were well past the stage in negotiations for unilateral action.

“The time for negotiating the agreement is over,” Bredar wrote. “The only question now is whether the Court needs more time to consider the proposed decree. It does not.”

The decree itself was negotiated by the Justice Department’s Civil Rights Division and the Baltimore Police Department in the closing days of the Obama administration. Under Barack Obama, Justice Department lawyers opened 25 investigations into local law enforcement agencies for unconstitutional practices. Among the police departments targeted were in Ferguson, Missouri, where predatory stops and arrests overwhelmingly targeted African Americans, and Chicago, where a damning Justice Department report in January found “systemic” violations of civil rights.

But that trend seems likely to reverse itself under the Trump administration. President Trump aligned himself closely with law enforcement during the presidential campaign, describing himself as a “law and order” candidate. Sessions is also a longtime critic of federal consent decrees, which he views as excessively burdensome for the local police departments that operate under them. In a statement Friday, the attorney general said he had “grave concerns” the decree would “result in a less safe city.”

“The mayor and police chief in Baltimore say they are committed to better policing and that there should be no delay to review this decree, but there are clear departures from many proven principles of good policing that we fear will result in more crime,” Sessions said. “The citizens of Baltimore deserve to see a real and lasting reduction in the fast-rising violent crime threatening the city.”

His stance drew criticism from reform-oriented groups that supported the decree’s implementation. “Attorney General Jeff Sessions’s efforts to unnecessarily obstruct and delay reform in Baltimore make clear that he intends to stand as an obstacle to policing reform across the country,” said Kristen Clarke, the president of the Lawyer’s Committee for Civil Rights Under Law.

The decree’s extensive terms require the city to redirect its focus towards improved training and community policing efforts. Among its most significant reforms are requiring officers to have “clear, articulable reasons” for making investigatory stops and to fill out paperwork for each of those interactions, both of which are aimed at reducing unnecessary or discriminatory stops and searches. As my colleague David Graham explained in January, those requirements were motivated by a Justice Department report last year into the city’s controversial policing tactics.

The report found, for example, that Baltimore police tended to make frequent stops and arrests, even when there was no useful law-enforcement reason for it, and often at the expense of community relations. But the problem ran much deeper: Police often made stops and arrests that fell afoul of constitutional protections. Many stops ended with no citation or arrest, and even when they did, booking officers often rejected charges as too flimsy—doing so 11,000 times between 2010 and 2015. Sometimes cops rounded up large numbers of people, then “unarrested” them when they determined they had no grounds for it. Justice also found that people were often arrested simply for exercising their First Amendment rights by criticizing or talking back to officers.

But those most likely to be arrested were disproportionately African Americans and people in heavily African American neighborhoods. Blacks were more likely to be arrested for minor, apparently pretextual violations like throwing dice—for which 99 percent of arrestees were black. The problem was so bad that boilerplate language provided to officers for logging arrests assumed by default that suspects would be black males. African Americans were also more likely to be exposed to excessive use of force.

City officials praised the decree’s implementation, which has the support of Mayor Catherine Pugh and Baltimore Police Department leadership. Pugh told reporters Friday that the city “will continue to move forward in reforming the Baltimore Police Department and building the bond of trust that must exist between the community and our police officers.”