A federal judge has ordered the Trump administration to keep deportation protection for 800,000 young undocumented immigrants known as "dreamers."

In a sharp rebuke to President Trump's efforts to end the program known as Deferred Action for Childhood Arrivals, District Judge John Bates also ordered the Department of Homeland Security to accept new applicants to the program for the first time since it became law in 2012.

The judge said Trump administration efforts to scrap DACA were illegal.

He called it "arbitrary and capricious because the department failed to adequately explain its conclusion that the program is unlawful."

But the judge stayed his ruling for 90 days to give officials more time to come up with a good reason for ending DACA.

FILE - People protest for immigration reform for D FILE - People protest for immigration reform for DACA recipients and a new DREAM Act, in Los Angeles, Jan. 22, 2018. FILE - People protest for immigration reform for DACA recipients and a new DREAM Act, in Los Angeles, Jan. 22, 2018.

There has been no response so far from the administration.

DACA shields about 800,000 young people who were illegally brought to the United States as children from deportation.

For the majority of these immigrants, the United States is the only home they know. They are taxpayers, business owners, have families, college graduates, and have served in the military.

While professing love for DACA recipients, Trump has called the Obama-era program illegal.

But he has challenged the Republican-led Congress to come up with a better plan — something it has so far failed to do.