A federal judge in Rhode Island on Tuesday accused the Trump administration of trying to “bully” states into accepting conditions that require them to cooperate on immigration enforcement actions to get disaster funding after he ruled earlier that those actions were unconstitutional.

U.S. District Judge William Smith, appointed by former Republican President George W. Bush, issued a summary judgment last month ruling that the Department of Homeland Security couldn’t impose the conditions.

Despite the September ruling, a coalition of 20 state Democratic attorneys general argued that the agency still attached the conditions to the grants along with language suggesting they would apply if the case was “stayed, vacated, or extinguished.”

Smith ordered Homeland Security to permanently stop enforcing those conditions against plaintiff states. The judge also mandated that the agency amend documents to states within seven days to remove language related to complying with federal immigration law.

Smith accused the agency of doing exactly what his order forbids, adding that the “fig leaf conditional nature of the requirement makes little difference.”

“Defendants’ new condition is not a good faith effort to comply with the order,” Smith wrote. “It is a ham-handed attempt to bully the states into making promises they have no obligation to make at the risk of losing critical disaster and other funding already appropriated by Congress.”

In their complaint, the states argued that for decades they counted on federal funding to prepare for, respond to, and recover from disasters. But they maintained that conditions imposed by the Trump administration, requiring them to commit state resources to immigration enforcement, jeopardized funding for disaster response.

The Department of Homeland Security was accused of “upending” emergency management systems, holding critical preparedness funding hostage unless states promised to devote resources to federal immigration enforcement beyond what state law allows.

Plaintiffs successfully argued that these conditions were unconstitutional and violated the Administrative Procedure Act. They stated the agency was merely repeating rejected language as part of a tactic to coerce local jurisdictions.

The government contended that the challenge was moot, as it had already decided to exempt some programs from the immigration requirements, and argued that it had the right to warn states of conditions that might be imposed if the ruling is overturned on appeal.