Protesters march outside the White House in support of the DACA program, which President Trump wants to scrap.
The Republican Party is demanding immigrants who moved to the United States as children must be deported, but this has been blocked for a 2nd time by a US District judge.
Nicholas Garaufis ruled the DACA program, which protects such immigrants will continue as before.
The decision's another setback for the Republicans after a similar ruling last month.
The US Justice Department insists DACA was unlawafully imposed by Trump's predecessor, Barack Obama.
U.S. Justice Department spokesman Devin O'Malley, "The Justice Department will continue to vigorously defend this position and looks forward to vindicating its position in further litigation."
The legal battle over DACA complicates a debate currently underway in Congress on whether to change the nation's immigration laws.
Last week, Defence Secretary James Mattis assured any military service members who came to the US illegally as children would not face deportation.
Garaufis said the administration could eventually rescind the DACA program, but the reasons it gave last September for doing so were too arbitrary and could not stand.
The Supreme Court on Friday is due to consider whether to take up the administration's appeal of the San Francisco ruling. The court could announce as soon as Friday afternoon whether it will be hearing the case.