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 justified taking federal control of the state's National Guard.

The Trump administration still maintains control over 300 California National Guard troops six months after they were federalised, according to Judge Breyer.

Breyer also denied the Trump administration's argument that the courts should refrain from intervening when a president takes over state National Guard troops during emergencies.

The Founders designed our government to be a system of checks and balances, Judge Breyer wrote in his ruling. Defendants, however, make clear that the only check they want is a blank one.

Judge Breyer's order will not take effect until December 15, allowing the Trump administration time to appeal to a higher court.

This year, Trump has deployed National Guard troops to various cities, including Portland and Washington D.C., where similar legal challenges have surfaced.

California Governor Gavin Newsom initially sued after Trump deployed the troops in June; although a previous court sided with the administration, calling the federalisation justified, Newsom argued that the necessity for troops had diminished since protests have subsided.

During a recent hearing, lawyers for the Trump administration contended that the troops should stay in LA due to continued targeting of federal immigration agents, yet Judge Breyer questioned if such a presence was warranted months down the line, suggesting that crises are transient.

Judge Breyer argued that the Trump administration was creating a new national police force by deploying California's National Guard troops across various states.

President Trump's deployment of National Guard troops has incited numerous legal challenges by state and local leaders, as he argues that military presence is required to manage violence in predominantly Democratic cities and bolster immigration initiatives.