On Friday, Judge Susan Illston in the Northern District of California listened to arguments in a hastily convened court meeting.
The lawsuit is backed by a broad coalition consisting of, among others, trade unions, cities, and aid organizations.
Just hours later, Illston announced that the Trump administration's attempt to lay off employees and shut down various offices and programs threatens vital services, reports The New York Times.
The judge points out, among other things, that the savings may stop emergency payments to farmers after natural disasters, as well as safety inspections of mines.
In her decision, the judge writes that "the president will likely have to request cooperation to implement the changes he wants to make", according to NBC News.
Among the designated departments are, among others, the Ministry of the Interior and the Ministry of Transport. The overarching authorities OMB and OPM, which deal with administration and personnel for the federal government apparatus, are also prevented from downsizing during the period.
The case continues on May 22, when the judge will listen to more opinions in the case.