The US Court of Appeals for the Fifth Circuit in New Orleans has rejected a request from the Obama administration that it lift an injunction barring it from carrying out a measure that would have protected some four million undocumented migrants from deportation.
President Barack Obama had used an executive order in November to drive through the measure, but in February, just before it was due to go into effect, a Texas judge issued an emergency injunction until a trial on its legality could be held.
The 2-1 vote in New Orleans could pave the way to a Supreme Court ruling.
The case has become the focal point of Obama's efforts to change the country's immigration policy.
Seeing no progress on legislative reform in Congress, Obama announced in November he would take executive action to help immigrants.
He has since faced criticism from Republicans who say the programme grants amnesty to lawbreakers.
Leading House Democrat Nancy Pelosi said the court's decision to uphold the injunction was "a disappointing delay of a clear outcome".
"Now is the time to restore fairness to our immigration system and honour the best traditions of our country by passing comprehensive immigration reform," Pelosi said in a statement.
Republican House Speaker John Boehner hailed the decision, and said Obama did not have the authority to issue the executive order in the first place.
"House Republicans are leading the fight to rein in President Obama's executive overreach and uphold our constitution, and we will continue to follow this case closely," he said in a statement.
'Will of the American people'
No fewer than 26 states, all but two Republican, had pressed the Texas judge to intervene following Obama's executive action, claiming he had acted unlawfully.
Obama's proposed programme would protect undocumented immigrants who have not committed crimes and have children who are US citizens or residents.
The White House claims having immigration authorities police millions of law-abiding undocumented immigrants distracts them from more pressing threats to national security.
Texas Governor Greg Abbott said in a statement: "The president's attempt to bypass the will of the American people was successfully checked again today."
The White House said the two appeals court judges who ruled against the administration chose to "misinterpret the facts and the law".
"The president's actions ... are squarely within the bounds of his authority and they are the right thing to do for the country," White House spokeswoman Brandi Hoffine said.
The US Department of Justice was evaluating the ruling and considering next steps, an official said.
The 5th Circuit will rule again in the coming months on whether the Obama administration can appeal the block to the executive order.
That decision may be made by a new panel of judges and will take into account more evidence.
Immigration advocates have been wary of the prospect that the 5th Circuit, known as one of the most conservative in the nation, would rule with the administration.
"We are disappointed, but this is not unexpected at all," Marielena Hincapie, executive director of the National Immigration Law Centre, said on a conference call with reporters.
Hincapie said immigration advocates were still optimistic that the executive order would prevail.
If the Obama administration is denied an appeal it may ask the Supreme Court to consider the case, potentially delaying the start of the immigration programmes until June 2016, a politically sensitive time in the run-up to the November presidential election.
"If the programmes go into effect next June, there will be real electoral consequences," said Marshall Fitz, vice president of immigration policy at the left-leaning Washington think-tank, the Center for American Progress.
"There is a clear contrast between [Democratic frontrunner Hillary] Clinton and any Republican in the current field."
Clinton has said she would like to see Obama's action expanded to shield even more immigrants from deportation.
At least 11 million undocumented immigrants live in the US.