A Maryland federal judge has rejected President Trump’s executive order requiring governors and local officials across the nation to agree in advance, in writing, to accept refugees.

U.S. District Judge Peter J. Messitte found that the change in refugee policy violates the Refugee Resettlement Act of 1980, which says the federal government must encourage refugees fleeing persecution in their home countries to re-settle in the U.S.

In his Wednesday ruling, Messitte wrote that Trump’s order unlawfully gives states and local government veto power over where refugees may settle, which is “arbitrary and capricious as well as inherently susceptible to hidden bias.”

After Trump issued his order last September, three refugee advocacy groups filed suit, saying it violates the Refugee Act, and Judge Messitte agreed:

One is left to wonder exactly what the rationale is for doing away entirely with a process that has worked so successfully for so long,” he wrote. “And why now?

“Texas recently announced it would become the first state to reject refugees since Trump issued the executive order,” says NPR, although the mayors of Houston, Dallas and Austin said they support taking in asylum-seekers, like the governors of 42 states and more than 100 local governments.

Seven states have not said whether they would accept refugees: Georgia, Florida, South Carolina, Alabama, Mississippi, Hawaii and Wyoming.

Messitte issued a preliminary injunction against the president’s order, saying that it “does not appear to serve the overall public interest,” so for now, at least, it can’t be enforced.

There’s been no comment so far from the Justice Department.