Silver Spring (US), Jan 16 (AP) A federal judge on Wednesday halted President Donald Trump's executive order that gave state and local officials the ability to shut the door on refugees, and ignited a fierce debate in communities about how welcoming the United States should be.

US District Judge Peter Messitte in Maryland said in his ruling that the president's order "flies in the face of clear Congressional intent" of the 1980 Refugee Act by allowing state and local governments to block the resettlement of refugees in their jurisdictions.

In issuing a preliminary injunction, Messitte said the process should continue as it has for nearly 40 years, with refugee resettlement agencies deciding where a person would best thrive.

Church World Service, Lutheran Immigration and Refugee Service, and HIAS — a Jewish nonprofit — filed the lawsuit in Greenbelt, Maryland, on November 21. They said they already work closely with state and local officials before resettling refugees in an area.

They called the order an attempt at a state-by-state ban on refugees.

Messitte agreed. "It grants them veto power. Period," the judge wrote.

The Trump order, which was issued in September and had been set to go into effect in June, required agencies to get written consent from state and local officials before resettling refugees in their jurisdictions. Trump said he acted to respect communities that believe they do not have the jobs or other resources to be able to take in refugees.

The White House said in a statement that the ruling was “preposterous"and that Congress under the Refugee Act afforded the president authority over the refugee resettlement process.

"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 statement said.

The order was the latest attempt by the Trump administration to thrust states and cities into immigration policy. It caused heated debates and raucous meetings in several towns from North Dakota to Tennessee, and put Republican governors in an uncomfortable position between immigration hardliners who want to shut the door and some Christian evangelicals who believe helping refugees is a moral obligation. Others say refugees are vital to fill jobs and keep rural communities afloat.

Trump has brought the order up on the campaign trail. At a Minneapolis rally in October, he said Washington leaders had sent “large numbers of refugees to your state from Somalia without considering the impact on schools and communities and taxpayers." The ruling comes less than a week after Texas became the first state to say it did not want more refugees.

Governor Greg Abbott said in a letter released January 10 that Texas, which took in more refugees than any other state during the 2018 fiscal year, "has been left by Congress to deal with disproportionate migration issues resulting from a broken federal immigration system." Abbott's office did not immediately respond to messages seeking comment on Wednesday's ruling.

Refugees have the right to move anywhere in the US after their initial resettlement, but at their own expense. (AP)

(This is an unedited and auto-generated story from Syndicated News feed, LatestLY Staff may not have modified or edited the content body)