(Reuters) – The U.S. Supreme Court on Thursday ruled 5-4 against President Donald Trump’s move to end the Deferred Action for Childhood Arrivals (DACA) program that offers work permits and deportation relief to certain immigrants who came to the country illegally as children. Here is a look at what could happen next for the hundreds of thousands of immigrants, often called “Dreamers,” enrolled in the program created in 2012 by Trump’s Democratic predecessor Barack Obama. DACA GOES BACK TO DEPARTMENT OF HOMELAND SECURITY The ruling, authored by Chief Justice John Roberts, sent the issue back to the U.S. Department of Homeland Security for further consideration, concluding that the administration did not provide sufficient reasoning to end DACA. The decision deemed the administration’s actions in seeking to rescind DACA “arbitrary and capricious” in violation of a federal law that governs regulatory changes. It does not stop Trump from trying again to rescind DACA or reduce its protections through other means. A senior Department of Homeland Security official said the agency was reviewing the ruling. NO DECISION YET ON TRUMP ACTION Trump criticized the Supreme Court after the ruling and said on Twitter he was seeking “a legal solution on DACA, not a political one,” and would have to “start this process all over again.” Trump did not specify what his administration would do next. It appears unlikely he would have time to lawfully terminate DACA before the Nov. 3 U.S. election in which Trump is seeking another four-year term in office. NEW APPLICATIONS IN QUESTION The ruling means that the roughly 649,000 immigrants, mostly young Hispanic adults born in Mexico and other Latin American countries, now enrolled in DACA will remain protected from deportation and eligible to obtain renewable two-year work permits. Lower courts had blocked Trump’s 2017 action so the program remained in effect, though the administration refused to process new applications. California Attorney General Xavier Becerra, whose state was among the challengers that sued to try to preserve DACA, said the ruling could reopen the program “to anyone who qualifies,” but that legal processes in lower courts were still ongoing that could determine whether new applications must be processed by the government. LOOKING TO CONGRESS Congress for years has been unable to pass comprehensive immigration legislation, thwarted primarily by partisan divisions. Democratic lawmakers after the ruling called on Congress to pass legislation permanently protecting current DACA enrollees and others brought to the United States illegally as children. DACA does not offer a path to citizenship. The Democratic-led House of Representatives passed a bill last year that would provide such a pathway to “Dreamers” and other immigrants covered by humanitarian programs. The Republican-led Senate has not taken up a similar measure. ELECTION RISKS Trump promised as a candidate in 2016 to end DACA, which he called one of Obama’s “illegal executive amnesties,” and has pursued hardline immigration policies but could face election risks if he again tries to rescind it. The U.S. public has become increasingly supportive of DACA, according to opinion polls. In a February Reuters/Ipsos poll, 64% of U.S. adult respondents voiced support for DACA’s core tenets. A similar December 2014 poll found that 47% of U.S. adults supported DACA.