A federal judge has ordered the Trump administration to immediately unfreeze funds for federal grant programs.

In a five-page order, U.S. District Court Judge John McConnell, Jr. wrote that the administration, in several instances, has continued “to improperly freeze federal funds and refused to resume disbursement of appropriated federal funds.”

Monday’s ruling came in response to a lawsuit brought by attorneys general in 22 states and the District of Columbia. In his decision, McConnell ordered the administration to “immediately restore frozen funding” and “immediately end any federal funding pause” that affects the challengers. The Trump administration argued in a court filing leading up to the decision that it had acted “in good faith to interpret the scope of the Court’s [temporary restraining order] and expeditiously resume any funding that is subject to it.”

The order is one of two lawsuits filed against the administration in response to the attempted funding pause, originally detailed in a memo by the Office of Management and Budget in late January. The memo was rescinded days after it was released, but the White House has said a review of federal funding is still necessary to make sure that spending aligns with the president’s agenda. In his order, McConnell said the freeze was “likely unconstitutional and has caused and continues to cause irreparable harm to a vast portion of this country.”

The judge pointed to information from the plaintiffs in the case that some funding has continued to experience delays and remains inaccessible after the initial court order. In an exhibit accompanying the judge’s order, the states listed affected funding from multiple agencies, including the Environmental Protection Agency, the Department of Energy and the Department of Health and Human Services.

The order also specifically directs the administration to restore any withheld funding that was appropriated through the Inflation Reduction Act and the Infrastructure Improvement and Jobs Act — both passed during the Biden administration.