A federal judge ruled Friday that the Trump administration must fully restore the Deferred Action for Childhood Arrivals (DACA) program.

In his 25-page opinion, Judge John Bates said the Trump White House had again failed to provide justification for its proposal to end the Obama-era program, under which nearly 800,000 people brought to the country illegally as children, known as "Dreamers," have received work permits and deferral from deportation.

The judge also said in his opinion that he has agreed to delay his ruling to give the Trump administration 20 days "to determine whether it intends to appeal the Court's decision and, if so, to seek a stay pending appeal."

President Trump rescinded DACA in September, a decision Bates wrote in his opinion "was arbitrary and capricious" with legal judgment that was "inadequately explained."

Bates further wrote that the U.S. District Court for the District of Columbia holds that if the Trump administration wishes to rescind the program, or take any other action for that matter, it must "give a rational explanation for its decision."

Bates said his court reaffirms its conclusion that DACA's rescission "was unlawful and must be set aside."

Earlier this year, Bates, a George W. Bush appointee, became the third federal judge to reject Trump's explanation for ending the program, ruling at the time that the decision by the Justice Department that the program was unlawful was "virtually unexplained."

The judge's decision on Friday comes amid high political tension over the Trump administration's hardline immigration policies.

Trump has faced backlash for his controversial "zero-tolerance" at the Mexican border, which prioritizes the prosecutions of migrants who illegally enter the United States.

The policy led to the separation of hundreds of migrant children from their parents, causing a bipartisan uproar. A court previously ordered the government to reunite the migrant families by last Thursday, but hundreds of children still remain divided from their parents.

Trump has signed an executive order to end the family separations, but also repeatedly pledged to shut down the government this fall if he fails to secure funding for his long-promised southern border wall.