A federal judge on Wednesday blocked President Donald Trump's deployment of National Guard troops in Los Angeles and ordered the troops be returned to the state governor's control.

In June, Trump sent thousands of National Guard troops to the California city in the wake of protests over his administration ramping up immigration raids in Los Angeles.

US District Judge Charles Breyer stated that the Trump administration had not proven that the city's protests against immigration warranted the federal control of the state's National Guard. Judge Breyer also noted that the Trump administration still had control over 300 California National Guard troops six months after they were federalized.

Breyer denied the Trump administration's contention that courts should refrain from intervening when a president assumes control of state National Guard troops during emergencies. He emphasized the Founding Fathers' intent for a system of checks and balances, warning against unchecking authority.

This ruling is set to take effect on December 15, giving the Trump administration time to pursue an appeal. White House spokeswoman Abigail Jackson stated that President Trump legally deployed the troops to assist federal officers and expressed confidence in winning the appeal.

The deployment of National Guard troops has been contentious this year, with similar actions in several cities leading to legal challenges. California Governor Gavin Newsom previously sued after the initial troop deployment in June, but a court sided with the administration, stating that the situation justified the federalization of the National Guard. Following the reduction in protests, Newsom filed a new legal challenge arguing that the need for troops had diminished.

During a hearing, the Trump administration's lawyers maintained that the troops should remain in Los Angeles due to ongoing threats against federal immigration agents. However, Judge Breyer questioned this rationale, suggesting that conflicts evolve and crises can abate over time.

Judge Breyer criticized the administration's approach, stating that the National Guard's deployment was effectively creating a national police force. This ruling follows earlier decisions indicating that Trump's earlier deployments to Los Angeles were illegal. Currently, all 50 states and several territories maintain their own National Guard contingents.

Trump has argued that deploying the National Guard is a necessary measure to combat violence and bolster his immigration policies in urban areas, particularly in cities governed by Democrats.