UPDATE (Nov. 26, 7:40 p.m. PT) — A federal judge in Oregon has issued a nationwide preliminary injunction against a Trump administration rule that would have banned immigrants from entering the United States if they couldn’t afford health care. 

The rule, issued in early October, would have required immigrants to show proof of health insurance or the ability to pay for their medical care before obtaining a visa. The administration had argued the rule was necessary to prevent costs associated with uninsured immigrants being “passed on to the American people” through higher taxes, premiums and medical fees.  

In his ruling, U.S. District Court Judge Michael Simon said he was not deciding whether or not such a rule was “good public policy,” but rather which branch of government had the right to make such a policy. 

That right, he wrote, belongs to Congress, which has the power to establish rules surrounding naturalization.

“The Proclamation was not issued under any properly delegated authority,” Simon wrote. 

In addition, he said, the rule was “inconsistent” with the Immigration and Naturalization Act passed by Congress in 1965, which established the immigration policy of the United States.

The injunction is effective immediately and will remain in place until Simon, or a higher court, orders otherwise.

The U.S. Department of Justice didn’t immediately return a request for comment.

Simon had previously issued a restraining order against the rule, which prevented it from going into effect earlier this month. The Portland-based Innovation Law Lab, which served as a plaintiff in the case, estimated that approximately 25,000 visas were granted during that time period that otherwise would have been denied.

“During this Thanksgiving week, we are so grateful for this court ruling that will keep families together and allow other families to reunite,” wrote Esther Sung, senior litigator at the Justice Action Center, another plaintiff that argued against the rule. “This decision is an important check on the Trump administration’s effort to rewrite our nation’s immigration and health care laws in violation of the boundaries set out in the Constitution.”

The new rule would affect immigrants overseas who are applying for visas. Asylum-seekers and refugees are exempt, as are non-citizen children of U.S. citizens.

Critics said Trump’s proclamation would have mostly affected immigrants from Africa, Asia and Latin America. And, they argued, it would have dealt a serious blow to the family-based immigration system.