Demonstrators hold illuminated signs during a rally supporting the Deferred Action for Childhood Arrivals program (DACA), or the Dream Act, outside the U.S. Capitol building in Washington, D.C., Jan. 18, 2018.

A U.S. appeals court in California ruled on Thursday that President Donald Trump's administration must continue a program begun under former President Barack Obama that protects hundreds of thousands of immigrants who were brought into the country illegally as children.

The decision by the San Francisco-based 9th U.S. Circuit Court of Appeals preserves the Deferred Action for Childhood Arrivals (DACA) program introduced in 2012 that has shielded from deportation a group of immigrants dubbed "Dreamers" and has given them work permits, though not a path to citizenship.

Trump has taken a stern stance against illegal immigration. His administration announced plans in September 2017 to phase out DACA, arguing that Obama exceeded his constitutional powers when he bypassed Congress and created the program. DACA offers protections to roughly 700,000 young adults, mostly Hispanics.

The three-judge panel rejected the administration's claim that the decision to end DACA was not reviewable by the courts.

"And, upon review, we conclude that plaintiffs are likely to succeed on their claim that the rescission of DACA - at least as justified on this record - is arbitrary, capricious, or otherwise not in accordance with law," Judge Kim McLane Wardlaw wrote.

The ruling represented another legal defeat for Trump concerning DACA, although he has won court victories on other parts of his tough immigration policies.

On Monday, the administration took the unusual step of asking the U.S. Supreme Court to review the case, which stems from a federal judge's January decision to block Trump from ending DACA, even though the appeals court had yet to rule.

Trump said on Wednesday he saw potential to work with Democrats, who won control of the House of Representatives this week, but he would have to see how the Supreme Court rules on the issue.

San Francisco-based U.S. District Judge William Alsup decided in January the government must continue processing renewals of existing DACA applications while litigation over the legality of Trump's action is resolved. The administration in February unsuccessfully appealed Alsup's ruling to the Supreme Court.

The ruling stems from a lawsuit brought by the University of California, the states of California, Maine, Maryland and Minnesota and others challenging Trump's move to end DACA.

Trump's move last year had called for the program to begin winding down this past March. Trump's action sparked an outcry from immigration advocates, business groups, colleges and some religious leaders. There are about 11 million illegal immigrants in the United States, according to the Pew Research Center.

Lawsuits both challenging and supporting Trump's decision to end DACA have been working their way through the courts, making it likely the issue will wind up in front of the Supreme Court.

The ruling by the 9th Circuit does not impact a nationwide injunction to preserve DACA issued by U.S. District Judge Nicholas Garaufis in Brooklyn in February, which also has been appealed.

In addition, a federal judge in Washington in August ordered the administration to fully restore DACA, including taking new applications. That decision was stayed pending appeal.

Legislation to extend protections for DACA recipients and provide them a path to citizenship failed in Congress this year.

WATCH: Here are the businesses profiting from immigration enforcement