The Trump administration must reinstate the Deferred Action for Childhood Arrivals (DACA) program due to its failure to give sufficient explanation for ending the policy, a federal judge ruled Friday.

U.S. District Judge John Bates said his decision to order the Obama-era policy be upheld is predicated on the Department of Homeland Security’s so-called failure to defend the merits of nullifying the program. “The court has already once given DHS the opportunity to remedy these deficiencies — either by providing a coherent explanation of its legal opinion or by reissuing its decision for bona fide policy reasons that would preclude judicial review,” Bates wrote in his 25-page opinion. “So it will not do so again.”

The federal judge issued an August 23 date start in order to provide the Trump administration time to re-enact the policy affecting more than “Dreamers,” who were unlawfully brought as children to the United States by their parents. Bates, appointed by former President George W. Bush, shot down a motion proposed by the Department of Justice to reconsider a previous ruling undoing the Trump administration’s change of course from the Obama years. The Department of Justice now has 20 days to choose whether to appeal Bates’ ruling.

In April, Bates joined two other judges in calling for the Trump administration to “restart renewals for people previously approved for DACA.”

The judge also chastised a memo authored by Homeland Security Secretary Kirstjen Nielsen, in which she reaffirmed her support for the “legal rationale” to suspend DACA, issued by then-acting Secretary Elaine Duke last September, adopting the legal recommendations of Attorney General Jeff Sessions.

“Although the Nielsen Memo purports to offer further explanation for DHS’s decision to rescind DACA, it fails to elaborate meaningfully on the agency’s primary rationale for its decision,” he wrote. “The memo does offer what appears to be one bona fide (albeit logically dubious) policy reason for DACA’s rescission, but this reason was articulated nowhere in DHS’s prior explanation for its decision, and therefore cannot support that decision now.”