President Donald Trump floated the option Tuesday to let some children brought to the country illegally stay in the country if the Supreme Court ruled against former President Barack Obama’s Deferred Action for Childhood Arrivals (DACA) program.

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

Trump commented as the Supreme Court takes up the legal case against the Trump administration as the president moved to end DACA.

The president appeared willing to make a deal, even as he remained skeptical about illegal immigrants brought to the country as children receiving amnesty.

“Many of the people in DACA, no longer very young, are far from ‘angels,'” he wrote. “Some are very tough, hardened criminals.”

Trump formally moved to end DACA in September 2017 but the decision was challenged in court.

In the past, the president offered to work out a deal with Congressional Democrats seeking to continue amnesty for DACA recipients, but it was difficult to do so as the future of the program was tied up in the courts.

Democrats and supporters are expected to rally at the Supreme Court on Tuesday to support the program.