A federal judge on Friday blocked President Trump’s new rules requiring immigrants to prove they can support themselves, in a withering opinion where he called the administration’s plans “simply offensive.”

Judge George B. Daniels, a Clinton appointee to the federal court in New York, said not only did Homeland Security cut too many procedural corners in issuing the new policy, but he said it appears to violate immigration law itself, and was “repugnant” to the vision of the American dream.

He issued an injunction blocking the policy, which would have given the government the power to reject immigration applications from someone who was deemed to have used too many social safety net programs or otherwise was likely to end up on the public dole.

Judge Daniels was particularly dismayed by one of the new tests for English proficiency, which studies have shown is a good yardstick for someone’s ability to succeed.

“The United States of America has no official language,” he scolded. “Many, if not most, immigrants who arrived at these shores did not speak English. It is simply offensive to contend that English proficiency is a valid predictor of self-sufficiency.”

The policy had been slated to take effect next week, but the judge’s nationwide injunction prevents that.

The administration had argued that U.S. law has long discouraged admitting immigrants who were likely to end up draining resources by becoming a “public charge.”

The crux of the debate before the court was over what, exactly, that meant.

Under Clinton-era rules, U.S. Citizenship and Immigration Services only looked at a few welfare programs to decide if a migrant was likely to become a public charge.

Homeland Security’s new rules expanded the list of benefits that could put someone over the line to include Medicaid, food stamps and public housing. The changes applied chiefly to migrants applying for green cards, or permanent legal status. Their applications could be rejected if they were deemed unlikely to sustain themselves.

Having an application rejected did not mean deportation. The migrant would be left the immigrant in whatever status he or she had before.

USCIS had insisted that the welfare use was just one factor — albeit a very big one — in determining a migrant’s ability to be self-sufficient.

The judge, though, said it was the chief factor, and said the law never envisioned that.

“Defendants do not articulate why they are changing the public charge definition, why this new definition is needed now, or why the definition set forth in the rule — which has absolutely no support in the history of U.S. immigration law — is reasonable,” Judge Daniels wrote.

“The rule is simply a new agency policy of exclusion in search of a justification. It is repugnant to the American Dream of the opportunity for prosperity and success through hard work and upward mobility,” he wrote.