President Trump on Tuesday described many of the immigrants dubbed “Dreamers” as “hardened criminals,” but said that if the Supreme Court backs his decision to end the Deferred Action for Childhood Arrivals program, he will cut a deal with Democrats.

“Many of the people in DACA, no longer very young, are far from ‘angels.’ Some are very tough, hardened criminals,” Trump said in a tweet.

“President Obama said he had no legal right to sign order, but would anyway. If Supreme Court remedies with overturn, a deal will be made with Dems for them to stay!” he added.

The high court is set Tuesday to hear arguments over the legality of Trump’s 2017 plan to rescind DACA, the Obama-era program that protects from deportation almost 700,000 immigrants who entered the US illegally as children.

The court’s 5-4 conservative majority includes two justices — Neil Gorsuch and Brett Kavanaugh — appointed by Trump, whose administration has argued that Obama exceeded his constitutional powers by bypassing Congress when he created DACA by executive action.

Trump has made his hardline immigration policies, including pursuing construction of a wall along the US-Mexican border, a centerpiece of his presidency and his re-election campaign for 2020.

DACA currently protects roughly 660,000 immigrants — mostly Hispanic young adults — from deportation and provides them work permits, though not a path to citizenship.

The Supreme Court is hearing Team Trump’s appeals of lower court rulings in New York, California and DC that blocked the president’s move and left DACA in place.

The lower courts ruled that Trump violated a US law called the Administrative Procedure Act, which requires policy changes be done in an orderly way, in seeking to rescind DACA.

In his 2017 statement on phasing out DACA, Trump spoke of the “tragic consequences” to the US of a decades-long failure by leaders in Washington to enforce immigration laws, citing among other things “the illicit entry of dangerous drugs and criminal cartels.”

The president wondered why so few in Washington had expressed “any compassion for the millions of Americans victimized” by the country’s immigration system.

“Before we ask what is fair to illegal immigrants, we must also ask what is fair to American families, students, taxpayers, and job seekers,” Trump said in the statement.

He has called on Congress to “advance responsible immigration reform” but never proposed a detailed replacement for DACA.

The program, which allows eligible immigrants to be issued renewable two-year work permits, remains in effect for those already enrolled, but the administration has refused to approve new applications.

Young immigrants, civil rights groups, universities and Democrat-led cities and states sued to block the administration.

With Post wires