Washington — A federal judge in Oregon blocked the Trump administration from enforcing a sweeping plan to deny visas to would-be immigrants based on their inability to show they could pay for health insurance or medical costs in the U.S.

Through a temporary restraining order, Judge Michael Simon of the U.S. District Court in Oregon blocked the policy hours before it was set to take effect on Sunday. According to an estimate by the non-partisan Migration Policy Institute, the new requirements could bar up to 375,000 prospective legal immigrants from moving to the U.S. each year.

"We applaud the court's ruling; 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," Jesse Bless, director of federal litigation at the American Immigration Lawyers Association (AILA), said in a statement.

Get Breaking News Delivered to Your Inbox

Earlier in the week, AILA, Innovation Law Lab and the Justice Action Center mounted the first legal challenge to the policy, which was rolled out last month. The groups accused the administration of trying to overhaul the nation's immigration laws without Congress. They said the policy would inflict irreparable harm on the plaintiffs, who are U.S. citizens sponsoring visas for family members abroad. Those family members could have been denied entry into the U.S. under the new requirements.

The White House on Sunday denounced Simon's order, vowing to continue defending the proposal in court. "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," White House press secretary Stephanie Grisham said in a statement.

If enacted, the policy would have represented a seismic shift in the way U.S. consular officers process immigrant visas.

Under the policy, applicants of immigrant visas would need to demonstrate to State Department consular officers that they will have the ability to obtain health insurance within a month of their arrival in the U.S. If they couldn't, petitioners needed to prove they have the financial resources to pay "reasonably foreseeable medical costs."

Although tasked by the order to establish "standards and procedures" for U.S. consular offices to determine whether applicants satisfy the new requirements, the State Department has yet to release public guidance for applicants.

Simon's ruling on Saturday is just one of several defeats the administration has suffered recently over its efforts to severely restrict legal immigration to the U.S.

Last month, several courts blocked the administration from implementing another sweeping policy, known as the "public charge" rule, that would allow officials to deny green cards and temporary visas to immigrants in the U.S. and abroad who use — or are likely to use — certain public benefits like food stamps and government housing programs.

Carmen Rubio, executive director of the Latino Network, a plaintiff in the litigation surrounding the proposed health care requirements, praised the ruling on Saturday.

"Today's decision highlights the urgency of blocking this health care ban before it causes irreparable damage to our community and those we serve," she said.

In his ruling, Simon said he would hold a hearing on November 22 to determine whether he will issue a preliminary injunction in the case. The temporary restraining order is valid for 28 days.