PROVIDENCE, R.I. (AP) — In a significant development, a federal judge has ruled against the Trump administration's attempt to reallocate federal Homeland Security funding from states that refuse to cooperate with certain federal immigration enforcement efforts.

U.S. District Judge Mary McElroy's ruling solidifies a victory for a coalition of 12 attorneys general who sued the administration earlier this year after learning that their states would face drastic reductions in federal grants due to their status as 'sanctuary' jurisdictions.

The U.S. Department of Homeland Security and the Federal Emergency Management Agency had proposed to cut more than $233 million from states including Connecticut, Delaware, the District of Columbia, Massachusetts, Minnesota, New York, Rhode Island, Vermont, and Washington. The funds are part of a $1 billion program intended for disaster response and safety, with allocations typically based on assessed risks within communities.

This initiative was made public shortly after a separate federal judge ruled that it was unconstitutional to condition FEMA disaster funding on states cooperating with immigration enforcement.

In her detailed 48-page ruling, Judge McElroy determined that the federal government's decisions concerning funding cuts were closely tied to the states' immigration policies, labeling them arbitrary and capricious. What else could defendants’ decisions to cut funding to specific counterterrorism programming by conspicuous round numbered amounts—by slashing off the millions-place digits—be if not arbitrary and capricious? McElroy wrote.

She ordered the Department of Homeland Security to revert the funding allocations to their original status for the plaintiff states, citing examples of how crucial these funds are to public safety and counterterrorism efforts. Citing incidents such as a recent attack at Brown University that resulted in multiple casualties, McElroy emphasized that withholding these funds based solely on political motives is not only inappropriate but illegal.

“Defendants’ wanton abuse of their role in federal grant administration is particularly troublesome,” McElroy stated, highlighting the gravity of the duty entrusted to them. In response to the ruling, Massachusetts Attorney General Andrea Joy Campbell remarked, This victory ensures that the Trump Administration cannot punish states that refuse to help carry out its cruel immigration agenda, particularly by denying them lifesaving funding that helps prepare for and respond to disasters and emergencies.”