The state of California on Monday filed suit against the Trump administration over its move to take control of the state’s National Guard and deploy troops to Los Angeles to protect immigration enforcement agents, accusing President Donald Trump of an “unprecedented usurpation of state authority and resources.”

The 22-page complaint, filed in the U.S. District Court in San Francisco, declared that Trump was violating both federal law and the Constitution and sought a judicial order that would unwind the deployment and return control of the National Guard to Gov. Gavin Newsom.

“President Trump has repeatedly invoked emergency powers to exceed the bounds of lawful executive authority,” the complaint said. “On Saturday, June 7, he used a protest that local authorities had under control to make another unprecedented power grab, this time at the cost of the sovereignty of the state of California and in disregard of the authority and role of the Governor as commander-in-chief of the state’s National Guard.”

The Justice Department declined to comment on the litigation.

Gov. Gavin Newsom had foreshadowed the filing in a social media post earlier Monday, a day of fast-moving events that began with a focus on the federalized National Guard moving into the streets of Los Angeles but ended with a significant escalation, as Defense Secretary Pete Hegseth said he was sending in 700 active-duty Marines.

In an interview on Monday, Newsom warned other governors across the country that Trump could repeat his move in their states, too, in the name of suppressing protests against the administration’s immigration crackdown.

“The president’s order that we are litigating on is a national order,” Newsom said. “It’s not just for Los Angeles. And so I continue to remind my fellow governors — not just Democratic governors, Republican governors — of how consequential it is and how significant an escalation it is.”

The complaint largely focused on the legitimacy of Trump’s seizure of control over the state’s National Guard. It sought a judicial declaration nullifying Trump’s order and declaring that it was unlawful for Hegseth to bypass Newsom in federalizing those forces.

But while the complaint declares that “use of the regular armed forces is similarly unlawful here,” it does not develop that idea at length or request a judicial order to send the Marines back to their base. It is possible the state could file an expanded complaint later.

The complaint also argued that by sending troops to perform the law enforcement function of keeping protests under control — a public safety job it said the Los Angeles police and sheriff’s departments were best equipped to handle — the Trump administration was violating the 10th Amendment, which preserves the rights of states.

Using military force “to quell a protest or prevent future protests despite the lack of evidence that local law enforcement was incapable of asserting control and ensuring public safety during such protests represents the exact type of intrusion on state power that is at the heart of the Tenth Amendment,” the suit argued.

Before the complaint was filed, the state’s attorney general, Rob Bonta, said in a news conference on Monday that, “We don’t take lightly to the president abusing his authority and unlawfully mobilizing California National Guard troops.”

He argued that local law enforcement had been capable of handling the situation and could have requested support from state partners. Bonta also said that the situation had been calming before Trump incited new unrest.

Trump said Saturday that he was imposing federal control over at least 2,000 National Guard troops for at least 60 days to quell the protests, and directed Hegseth to determine which ones to use. He also authorized Hegseth to use active-duty troops if necessary.

Trump’s order raises many legal complexities, including whether a rebellion against federal authority is indeed taking place, and whether a court could reject a president’s claim that the situation rises to the level that would make it lawful to send in troops.