A federal judge on Wednesday blocked the enforcement of President Trump’s executive order that would allow state and local officials to opt out of accepting refugees — the latest judicial hurdle for the administration’s immigration policies.

U.S. District Judge Peter Messitte agreed to issue the preliminary injunction, which had been requested by three faith-based national resettlement agencies: HIAS Inc., Church World Service Inc., and Lutheran Immigration and Refugee Service.

OMAR RESPONDS AFTER TEXAS USES TRUMP EXECUTIVE ORDER TO OPT OUT OF REFUGEE PROGRAM

Trump issued the executive order in September saying that the federal government would only resettle refugees if states and local governments had consented to do so — giving states a de facto veto over whether they would resettle refugees. The government is expected to appeal the injunction order.

"State and local governments are best positioned to know the resources and capacities they may or may not have available to devote to sustainable resettlement, which maximizes the likelihood refugees placed in the area will become self-sufficient and free from long-term dependence on public assistance," the order said.

Last week, Texas Gov. Greg Abbott announced that Texas would become the first state to opt out, saying that "Texas has carried more than its share in assisting the refugee resettlement process" and that it "continues to have to deal with the consequences of an immigration system that Congress has failed to fix."

But those opposing the order claim that it is unlawful and unconstitutional, adding that it would ruin the refugee program and have “disastrous consequences not only for Plaintiffs and eligible refugees but for the image of the United States as a beacon of liberty,” according to the ruling.

The administration, however, said that the order is lawful and argued that since the president has authority over how many refugees are going to be resettled, he also has the power to decree whether states have the authority to determine whether they want them.

TRUMP ADMINISTRATION ASKS SUPREME COURT TO ALLOW RULE RESTRICTING GREEN CARDS FOR IMMIGRANTS ON WELFARE

Judge Messitte ruled against the administration, saying the case was likely to succeed on its merits. In doing so, he ruled that beyond analysis of the statutory text, “a potentially insuperable Constitutional barrier looms” because the power to admit or exclude non-citizens is exclusively federal in nature — meaning that the decision can’t be left up to the states.

“Making the resettlement of refugees wholly contingent upon the consents of State or Local Governments, as the veto component of the proposed Order would have it, thus raises four-square the very serious matter of federal pre-emption under the Constitution,” he wrote. “It is hard to see how the Order, if implemented, would not subvert the delicate federal-state structuring contemplated by the Refugee Act.”

The ruling also says the administration appears to have failed to consider a number of “critical factors,” including how to handle secondary migration — where a resettled refugee moves to a non-consenting jurisdiction.

CLICK HERE TO GET THE FOX NEWS APP

Trump announced that the U.S. would take in just 18,000 refugees in fiscal year 2020, a significant drop from the cap of 110,000 set by former President Barack Obama in 2016

The executive order is one of a number of immigration policies that have been put on ice by the courts. The Justice Department on Thursday filed an emergency request to the Supreme Court to have injunctions lifted on the Trump administration’s proposed rule that would restrict green cards for immigrants who are deemed likely to be reliant on welfare.