President Trump Donald John TrumpFederal prosecutor speaks out, says Barr 'has brought shame' on Justice Dept. Former Pence aide: White House staffers discussed Trump refusing to leave office Progressive group buys domain name of Trump's No. 1 Supreme Court pick MORE said Friday that a bipartisan legislative deal on immigration may be on the horizon if the Supreme Court rules in his favor over ending the Deferred Action for Childhood Arrivals (DACA) program.

Trump tweeted that if the high court backs his move to rescind DACA, an Obama-era program that offers safeguards for undocumented immigrants who came to the country as children, he and Congress will reach an agreement "to the benefit of all" — though comprehensive immigration reform has thus far eluded lawmakers.

DACA will be going before the Supreme Court. It is a document that even President Obama didn’t feel he had the legal right to sign - he signed it anyway! Rest assured that if the SC does what all say it must, based on the law, a bipartisan deal will be made to the benefit of all! — Donald J. Trump (@realDonaldTrump) September 6, 2019

The Supreme Court said in July it will rule on Trump's DACA termination during their next term, which begins in October. The justices had previously declined to take up the administration's challenge to a district court ruling that temporarily blocked officials from winding down the program.

ADVERTISEMENT

A ruling in Trump's favor could give him an edge in immigration negotiations, but reaching a deal with a deeply divided Congress could prove impossible ahead of next year's elections.

In 2017, Trump resolved to end the program protecting so-called Dreamers, and on Friday he repeated his arguments that the implementation of DACA was an illegal extension of the president's powers.

"But in any event, how can he have the right to sign and I don’t have the right to ‘unsigned,’ ” he tweeted. “Totally illegal document which would actually give the President new powers.”

Trump has made hard-line immigration policies a major part of his administration and reelection campaign, though a pair of appeals courts have ruled against his move to end DACA. A Supreme Court ruling on that move could come next summer, just months before Election Day.