A federal judge in Oregon on Saturday blocked the Trump administration's rule requiring immigrants applying for U.S. visas to prove they have health insurance or can afford medical costs from going into effect Sunday.

U.S. District Judge Michael Simon granted the temporary restraining order while he considers a federal lawsuit brought Wednesday by seven U.S. citizens and a nonprofit organization, who contend the rule change would block nearly two-thirds of all prospective legal immigrants. It was not immediately clear when Simon would rule on the merits of the case.

TRUMP ADMIN TO RESTRICT VISAS FOR UNINSURED APPLICANTS

The White House announced last month that people seeking immigrant visas from abroad 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 prospective measure would not apply to those already in the United States, nor would it apply to lawful permanent residents, asylum seekers, refugees or children. However, it would apply to parents and spouses of U.S. citizens, the White House said.

The White House said in a statement at the time the proclamation was issued that too many non-citizens were taking advantage of the country's "generous public health programs," and said immigrants contribute to the problem of "uncompensated health care costs."

THOUSANDS OF MIGRANTS SENT BACK TO MEXICO UNDER TRUMP POLICY HAVE GIVEN UP THEIR ASYLUM CLAIMS: DHS

“We’re very grateful that the court recognized the need to block the health care ban immediately,” Justice Action Center senior litigator Esther Sung said. “The ban would separate families and cut two-thirds of green-card-based immigration starting tonight, were the ban not stopped."

PELOSI SAYS SHE'S 'NOT A BIG FAN OF MEDICARE-FOR-ALL,' CAUTIONS AGAINST PROMOTING IT IN 2020

Under the rule, insurance can be short-term coverage or catastrophic, and it can be purchased individually or provided by an employer.

According to the nonpartisan Migration Policy Institute, 57 percent of U.S. immigrants had private health insurance in 2017 compared to 69 percent of U.S.-born citizens who had private health coverage, and 30 percent of immigrants had public health insurance versus 36 percent of native-born people.

CLICK HERE TO GET THE FOX NEWS APP

From 2013 to 2017, the uninsured rate for immigrants dropped 12 percent, from 32 to 20 percent, due to the Affordable Care Act, according to the think tank.

About 1.1 million people obtain green cards to become permanent residents of the U.S., every year.

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.

Fox News' Morgan Phillps and The Associated Press contributed to this report.