A federal appeals court ruled Thursday that President Donald Trump cannot end an Obama administration program that protects undocumented immigrants brought to the United States as children.

A panel of the U.S. Court of Appeals for the 9th Circuit agreed with a federal district judge's decision in January that Trump lacked the authority to eliminate the program – a proposal the president made last year in hopes of prodding Congress to act.

"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," the three-member panel said.

"In a world where the government can remove only a small percentage of the undocumented noncitizens present in this country in any year," the panel said, DACA lets it "devote much-needed resources to enforcement priorities such as threats to national security, rather than blameless and economically productive young people with clean criminal records."

The decision leaves in place for now the popular Deferred Action for Childhood Arrivals program known as DACA, which has protected more than 700,000 undocumented immigrants from deportation and enabled them to get work permits. But the dispute is likely to wind up before the Supreme Court.

The court noted it was created because of the "cruelty and wastefulness of deporting productive young people to countries with which they have no ties."

But the Justice Department is likely to appeal the ruling to the Supreme Court, which now has five reliably conservative justices. The high court in February refused to leap-frog the appeals court's review of Judge William Alsup's decision.

Two other federal appeals courts also are reviewing the dispute between the Trump administration and the states, local governments and immigrant rights groups fighting to maintain the program.

Sanaa Abrar, advocacy director for United We Dream, a youth-led immigration advocacy group, predicted that those rulings will come to the same conclusion.

"Another federal court has said what we've always known: that Trump's decision to kill DACA was wrong and that his sole motivation was to deport 800,000 people of color," Abrar said in a statement.

The opinion strikes down an argument often made by the Trump administration: that DACA was an unconstitutional "end run" around Congress, which has repeatedly blocked the DREAM Act, which has been introduced since 2001 but never has passed both chambers.

The 9th Circuit pointed out that the two policies provide very different forms of relief. DACA grants protection from deportation; the DREAM Act would confer legal permanent residency, which leads toward U.S. citizenship.

To reach its conclusion, the 9th Circuit decision explores more than 100 years of presidential administrations deciding that not every law must be enforced 100 percent of the time, and that not all people should be punished for every violation.

The opinion cited President Ronald Reagan’s decision to protect relatives of undocumented immigrants who were granted amnesty in 1986 and President Dwight Eisenhower’s decision to protect over 30,000 Hungarian refugees in 1956. It found 19 other examples of large groups of foreigners protected from deportation.

The court even cited the case of John Lennon and Yoko Ono, who were nearly deported due to a marijuana possession charge in Britain but were ultimately allowed to remain in the U.S. because they were not priorities for deportation.