A U.S. judge on Thursday temporarily barred Donald Trump from deploying National Guard troops in Los Angeles, finding that the Guard was unlawfully mobilized by Trump.

Judge Charles Breyer ordered the National Guard to return to the control of California Governor Gavin Newsom, who sued to restrict its activity. Breyer’s order will take effect at noon on Friday.

“The Court is troubled by the implication inherent in Defendants’ argument that protest against the federal government, a core civil liberty protected by the First Amendment, can justify a finding of rebellion,” Breyer wrote.

The Trump administration immediately appealed the judge’s order.