The Supreme Court surprised many on Thursday by ruling that the Trump administration’s rescission of the Deferred Action for Childhood Arrivals (DACA) program was arbitrary and capricious, putting the termination of DACA on hold—for now. Chief Justice John Roberts authored the opinion and was joined by the Court’s four liberal justices in the 5-4 majority.

DACA is a program created by the Obama administration in 2012 that allows undocumented individuals who arrived in the United States as children to apply for temporary protection from deportation and to lawfully work. Terminating DACA had been part of the President’s immigration agenda, and in 2017 the Department of Homeland Security (DHS) did so on the sole ground that DACA was unlawful. Multiple lawsuits were immediately filed challenging the termination, claiming that it was an arbitrary and capricious, and thus unlawful, agency action.

The lawsuits eventually made their way to the Supreme Court, which heard arguments in the case last fall. In Thursday’s decision, the Court ruled that DHS’s rationale wasn’t enough. Chief Justice Roberts wrote that the agency’s explanation failed to consider important issues, such as the possibility of terminating the affirmative benefits of DACA—i.e., providing work authorization—while leaving the deferral of deportation intact. The Court also said that DHS should have addressed the fact that DACA recipients and their families, schools, and employers have relied on the DACA program. Indeed, as the Court pointed out, DACA recipients have enrolled in college, started careers and businesses, purchased homes, and started families all in reliance on the DACA program. This reliance is something DHS should have considered before terminating the program.

While the Supreme Court’s decision is certainly good news to the hundreds of thousands of DACA recipients in the U.S., it is likely not the end of the story. The Court did not rule on whether the DACA program is lawful or not. It simply determined that the way in which DHS terminated the program was unlawful. Indeed, in pointing out the Trump Administration’s errors, it provided a legal roadmap for the Administration to follow the next time around should it wish to try to terminate DACA again. While DACA recipients are surely celebrating for the moment, the Supreme Court’s decision only highlights the need for a permanent, legislative solution.