A US judge has blocked the White House's attempt to end a programme that prevents the deportation of children brought illegally to the US by parents.
San Francisco Judge William Alsup has ruled the Deferred Action for Childhood Arrivals (DACA) programme must stay in place while litigation against US President Donald Trump's move to rescind it continues.
The Obama-era scheme protects some 800,000 people and provides temporary permits for work and study.
In his ruling, William Alsup said "the government is hereby ordered and enjoined, pending final judgment herein or other order, to maintain the DACA programme on a nationwide basis on the same terms and conditions as were in effect before the rescission".
He said the justice department's argument that the scheme was illegal was based on a "flawed legal premise".
The district judge ordered the government to process renewal applications from people who had previously been covered.
However, this would not be the case for those who had never before received protection under the programme.
The DACA scheme was created in 2012 by then President Barack Obama to shield children of undocumented immigrants from deportation, known as "dreamers".
It also provided work and study permits for those it covered.
In order to qualify for DACA, applicants under the age of 30 were required to submit personal information to the Department of Homeland Security, including addresses and phone numbers.
They had to pass an FBI background check, have a clean criminal background, and either be in school, recently graduated or have been honourably discharged from the military.
In exchange, the US government agreed to "defer" any action on their immigration status for a period of two years.
The majority of dreamers are from Mexico and other Latin American countries.
White House officials have so far made no public comments on the latest development.
Despite scrapping the programme in September, Mr Trump delayed enforcement to give Congress until March to enact a replacement plan for Daca recipients, who are known as "Dreamers".
On Tuesday, Democrats and Republicans announced that they would work together on a new immigration bill to protect border security, chain migration, the visa lottery system and the DACA.
Democrats have repeatedly said that they would block any legislation that contains funding for the border wall with Mexico - a key campaign pledge of Mr Trump's.
The justice department said no current DACA recipients would be affected by the decision to scrap the scheme before 5 March 2018, but no new applications will be taken.