President Trump said Wednesday he would have a "scary" amount of power if the Supreme Court were to decide it's illegal to dismantle the Deferred Action for Childhood Arrivals program created by former President Barack Obama.

"If the Supreme Court rules that President Obama was wrong, which they should because — by the way, if he was right, then I've been given tremendous power," Trump told reporters at the White House Wednesday. "Can you imagine me having that power? Wouldn't that be scary?"

"If President Obama is allowed to do what he did on DACA, then I'm allowed to do whatever I want to do on things that, you know, probably a president ... doesn't have the right to do," he added.

DACA allowed younger immigrants who came to the U.S. illegally as children stay in the U.S. and work. Trump and other opponents of the program argue that Obama created it without any input or authority from Congress and that Trump should therefore be able to disband the initiative just as easily.

But federal judges in California, New York, and Washington, D.C., ruled Trump acted illegally when he tried to shut it down, and the matter is now before the 9th Circuit Court of Appeals. The Trump administration has already asked the Supreme Court to take up the issue.

Trump has previously floated the idea of agreeing to some new form of DACA, possibly as part of a deal that gets him the $5 billion in border wall funding he wants. But on Wednesday, he said it's best to wait for a Supreme Court ruling.

"I just think that we're better off waiting for the Supreme Court," he said.

[Related: Trump says court ruling sank DACA-wall deal]