SAN FRANCISCO — A U.S. appeals court ruled Thursday that President Donald Trump cannot immediately end an Obama-era program shielding young immigrants from deportation.

A three-judge panel of the 9th U.S. Circuit Court of Appeals unanimously kept in place a preliminary injunction blocking Trump’s decision to phase out the Deferred Action for Childhood Arrivals program.

Lawsuits by California and others challenging the administration’s decision will continue in federal court while the injunction remains in place.

DACA has protected some 700,000 people who were brought to the U.S. illegally as children or came with families that overstayed visas.

In Thursday’s ruling, 9th Circuit Judge Kim Wardlaw said California and other plaintiffs were likely to succeed with their claim that the decision to end DACA was arbitrary and capricious.

She said the court is not trying to infringe on the president’s power regarding immigration law and instead wants to enable the exercise of that authority “in a manner that is free from legal misconceptions and is democratically accountable to the public.”

The Trump administration has said it moved to end the program last year because Texas and other states threatened to sue, raising the prospect of a chaotic end to DACA.

An email to the U.S. Department of Justice was not immediately returned.

DACA has protected some 700,000 people who were brought to the U.S. illegally as children or came with families that overstayed visas.

Trump’s decision to end it prompted lawsuits across the nation, including one by California. A judge overseeing that lawsuit and four others ruled against the administration and reinstated the program in January.

U.S. District Judge William Alsup rejected the argument that then-President Barack Obama had exceeded his power in creating DACA and said the Trump administration failed to consider the disruption that ending the program would cause.

The Trump administration then asked the 9th Circuit to throw out Alsup’s ruling.

During a hearing in May, Deputy Assistant Attorney General Hashim Mooppan argued that the courts could not review the administration’s decision to end DACA and defended the move against assertions that it was arbitrary and capricious.

“It’s a question of an agency saying, ‘We’re not going to have a policy that might well be illegal,'” Mooppan told the judges. “That is a perfectly rational thing to do.”

Mooppan said the administration was under no obligation to consider the fact that people had come to rely on DACA.

The judges on the 9th Circuit panel appeared skeptical of the argument that the DACA decision was beyond the court’s authority to review.

Wardlaw noted at the previous hearing that another appeals court had reviewed a similar Obama administration immigration policy.

Judge Jacqueline Nguyen questioned whether courts could intervene if they thought DACA was legal and disagreed with the administration’s position that it wasn’t.

The administration has been critical of the 9th Circuit and took the unusual step of trying to sidestep it and have the California DACA cases heard directly by the U.S. Supreme Court. The high court in February declined to do so.

Federal judges in New York and Washington also have ruled against Trump on DACA.