The U.S. Supreme Court agreed Friday to take up a dispute over President Trump’s efforts to rescind the Deferred Action for Childhood Arrivals program.

The court will decide next term whether the Trump administration's decision to end the Obama-era program was unlawful, with a decision to be handed down by the end of June 2020, amid the heat of the presidential campaign. DACA protects immigrants brought to the U.S. illegally as children from the threat of deportation.

The Trump administration announced in September 2017 it would be terminating the DACA program, which effects roughly 700,000 immigrants, and gave Congress until March 2018 to codify the protections into law.

But the administration’s actions were swiftly challenged in federal court, and a federal judge in San Francisco blocked Trump’s attempted rollback. The ruling from U.S. District Judge William Alsup required the Department of Homeland Security to continue accepting and processing renewal applications for DACA recipients.

The Justice Department asked the Supreme Court last year to weigh in on the challenge to Trump’s attempt to rescind DACA and bypass the 9th Circuit before it could issue its ruling.

But the high court rejected the Justice Department’s request and ordered the appeals court to “proceed expeditiously” with reviewing Alsup’s order.

The 9th Circuit then heard oral arguments in the case in May 2018. But before it could issue its ruling, the Trump administration asked the Supreme Court once more to take up the dispute over the legality of Trump’s termination of DACA.

Days after the Justice Department filed its request with the court, the 9th Circuit ruled against Trump and upheld the lower court’s order blocking the government from ending the program.

The 4th U.S. Circuit Court of Appeals in May became the second federal appeals court to hand a loss to Trump administration over DACA's rescission. A divided three-judge panel there found the Department of Homeland Security’s decision to rescind the program violated federal law because “it was not adequately explained and thus was arbitrary and capricious.”

In filings with the Supreme Court, Solicitor General Noel Francisco warned that continuing DACA requires the Trump administration to maintain a policy it believes it should be terminated.

“The district court’s nationwide injunction commands the government to preserve a policy that affirmatively sanctions the ongoing violation of federal law by 700,00 aliens who have no lawful immigration status and no right to the policy’s continuation,” Francisco wrote in court filings. “Absent this Court’s intervention, the government will be required to maintain the policy nationwide for years after DHS and the Attorney General determined that it should end.”

In addition to the challenge before the 9th Circuit, federal judges in New York and Washington, D.C., also ruled against the Trump administration.