A federal judge in California has ruled that the manner in which President Donald Trump deployed the National Guard to Los Angeles this summer was illegal.

The decision emerges amidst Trump's intentions to utilize National Guard troops to address crime in more US cities and bolster immigration enforcement.

US District Judge Charles Breyer stated Trump violated the Posse Comitatus Act, which restricts the military's use in domestic situations.

White House spokesperson Anna Kelly criticized the ruling, claiming it undermines the authority of the Commander-in-Chief in ensuring public safety.

The ruling is temporarily stayed until September 12.

The Trump administration is expected to appeal the decision, with Kelly asserting that the President remains committed to protecting law-abiding citizens.

California Governor Gavin Newsom praised the court's ruling, suggesting it stands for democracy and the Constitution.

Trump's deployment of the National Guard in June aimed to manage protests against immigration raids. While the White House argued military presence was necessary for safety, state officials contested that local law enforcement sufficed.

Breyer's order has implications beyond California, potentially foreshadowing similar legal challenges to Trump's law enforcement policies involving the National Guard.

The Posse Comitatus Act, established in 1878, prohibits military involvement in civilian law enforcement unless explicitly authorized by Congress or in cases of national emergency.

Judge Breyer highlighted that the deployment included tasks such as traffic control and crowd management, which are prohibited under the Act.

Concerns were expressed that Trump's actions could lead to the establishment of a national police force under presidential control.

Moreover, following the deployment, Newsom initiated a lawsuit against the Trump administration for alleged violations of the Posse Comitatus Act.

Breyer ruled in favor of Newsom on another related case, although Trump's administration had previously won an appeal.