President Donald Trump on Wednesday appealed a federal judge’s ruling, which found that his deployment of National Guard troops and Marines to Los Angeles to engage in law enforcement activities was illegal.

The appeal came a day after Judge Charles Breyer said that Trump’s deployment of thousands of Guard troops and hundreds of Marines in June violated the Posse Comitatus Act, which generally bars U.S. military forces from engaging in domestic law enforcement actions.

Breyer’s ruling barred the 300 remaining Guard troops in Los Angeles from making arrests, searching locations, and conducting crowd control while they are stationed in Los Angeles.

His ruling, which came in response to a lawsuit by California Gov. Gavin Newsom, also prohibits similar law enforcement duties by Guard troops or military forces anywhere else in the state.

The judge had paused the enforcement of his decision in San Francisco federal court to give the Trump administration time to file an appeal of the ruling with the 9th Circuit U.S. Court of Appeals.