Before being allowed into the United States, refugees undergo extensive vetting, including security checks, that can take years to complete. Once in the country, they become eligible for legal permanent residency and later can apply for citizenship.

The injunction followed a legal challenge to the executive order in November by three nonprofit organizations that are among faith-based agencies contracted by the government to resettle refugees. They argued that the presidential order was a violation of the Refugee Act and unconstitutional because the federal government, not states and localities, has authority over immigration policy.

Judge Messitte concluded that the plaintiffs, Lutheran Immigrant and Refugee Service, Church World Service and the Jewish refugee resettlement group HIAS, were likely to succeed in their lawsuit. As a result of his ruling, states and localities are temporarily relieved of the requirement to give explicit consent to continue receiving refugees.

“We’re grateful to Judge Messitte for upholding the rule of law and ensuring that the United States remains a place of welcome for the world’s most vulnerable,” said Krish O’Mara Vignarajah, president of Lutheran Immigration and Refugee Service.

But the Trump administration was critical of the ruling, saying that many communities do not have the resources to support large numbers of refugees and deserve to have a voice in determining whether more of them must be accommodated.

“Another lawless district court has asserted its own preferred immigration policy in place of the laws of the United States — and, in so doing, robbed millions of American citizens of their voice and their say in a vital issue directly affecting their communities,” the White House press secretary, Stephanie Grisham, said in a statement.

She called the injunction “a preposterous ruling, one more example of nationwide district court injunctions run amok.”