Washington (CNN) A federal appeals court on Thursday upheld a ruling blocking the Trump administration from ending the Obama-era program that protects young undocumented immigrants who came to the United States as children from being deported -- likely setting up a Supreme Court fight.

The ruling from a panel of the 9th US Circuit Court of Appeals means a nationwide injunction allowing the Deferred Action for Childhood Arrivals program to continue will remain in effect.

President Donald Trump called the ruling "good news" because he never expected the liberal 9th Circuit to agree with the administration and it tees up a potential Supreme Court argument.

"The good news is, by rejecting DACA in the 9th Circuit -- finally, we've been waiting for that -- we get it to the Supreme Court," Trump said at the White House on Friday. "We want to be in the Supreme Court on DACA."

The 9th Circuit ruled that challengers to the decision to end DACA are likely to succeed in their argument that the planned phase-out is illegal.

Read More