Officials in Washington, D.C., reached a deal with the Justice Department on Friday, after a judge urged them to come to a resolution, that prevents the Trump administration from taking full control of the city's police department over the weekend, according to a report.

The Justice Department agreed to revise Attorney General Pam Bondi's order this week that named Terry Cole, head of the Drug Enforcement Administration, as emergency police commissioner, Politico reported. Under the new order, Cole will be named as Bondi’s “designee for requesting services” from the police department, according to the report.

“We think that solves the problem and that’s what we’re planning to do immediately,” Justice Department attorney Yaakov Roth said.

However, underlying legal disputes remain unresolved.

At a hearing, U.S. District Judge Ana Reyes suggested she would sign off on a request from the city's attorney general to temporarily block the Justice Department if it fails to rewrite Bondi's order by Friday evening.

“I still do not understand on what basis the president … can say ‘You, police department, can’t do anything unless I say you can.’ That cannot be the reading of the statute,” Reyes said, according to Politico.

A hearing on remaining legal questions is scheduled for next week.