PORTLAND, Ore. — A federal judge in Portland, Oregon, on Saturday put on hold a Trump administration rule requiring immigrants prove they will have health insurance or can pay for medical care before they can get visas.

U.S. District Judge Michael Simon granted a temporary restraining order that prevents the rule from going into effect Sunday. It’s not clear when he will rule on the merits of the case.

Seven U.S. citizens and a nonprofit organization filed the federal lawsuit Wednesday contending the rule would block nearly two-thirds of all prospective legal immigrants.

The lawsuit also said the rule would greatly reduce or eliminate the number of immigrants who enter the United States with family sponsored visas.

“We’re very grateful that the court recognized the need to block the health care ban immediately,” says Justice Action Center senior litigator Esther Sung, who argued at Saturday’s hearing on behalf of the plaintiffs. “The ban would separate families and cut two-thirds of green-card-based immigration starting tonight, were the ban not stopped.”

The proclamation signed by President Donald Trump in early October applies to people seeking immigrant visas from abroad — not those in the U.S. already. It does not affect lawful permanent residents. It does not apply to asylum-seekers, refugees or children.

The proclamation says immigrants will be barred from entering the country unless they are to be covered by health insurance within 30 days of entering or have enough financial resources to pay for any medical costs.

The rule is the Trump administration’s latest effort to limit immigrant access to public programs while trying to move the country away from a family based immigration system to a merit-based system.

The White House said in a statement Sunday that it strongly disagrees with the decision.

“Once again, a nationwide injunction is permitting a single judge to thwart the President’s policy judgment on a matter where Congress expressly gave the President authority,” said the statement from Press Secretary Stephanie Grisham.

“It is wrong and unfair for a single district court judge to thwart the policies that the President determined would best protect the United States healthcare system — and for the United States taxpayers to suffer the grave consequences of the immense strain inflicted on the healthcare system from subsidizing uncompensated care for those seeking admission.

Under the government’s visa rule, the required insurance can be bought individually or provided by an employer and it can be short-term coverage or catastrophic.

Medicaid doesn’t count, and an immigrant can’t get a visa if using the Affordable Care Act’s subsidies when buying insurance. The federal government pays for those subsidies.

According to the Migration Policy Institute, a nonpartisan immigration think tank, 57% of U.S. immigrants had private health insurance in 2017, compared with 69% of U.S.-born, and 30% had public health insurance coverage, compared with 36% of native-born.

The uninsured rate for immigrants dropped from 32% to 20% from 2013 to 2017, since the implementation of the Affordable Care Act, according to Migration Policy.

There are about 1.1 million people who obtain green cards each year.

“Countless thousands across the country can breathe a sigh of relief today because the court recognized the urgent and irreparable harm that would have been inflicted” without the hold, said Jesse Bless, director of federal litigation at the American Immigration Lawyers Association.

Earlier this year, the administration made sweeping changes to regulations that would deny green cards to immigrants who use some forms of public assistance, but the courts have blocked that measure.