A judge has ordered U.S. President Donald Trump to return control of the California National Guard to the state, saying the President's decision to deploy them to protest-hit Los Angeles over Governor Gavin Newsom's objections was "illegal."

"His actions were illegal ... He must therefore return control of the California National Guard to the Governor of the State of California forthwith," U.S. District Judge Charles Breyer wrote of the President in the ruling, seen by AFP.

Trump says he will ’liberate’ Los Angeles in speech to mark the U.S. Army’s 250th anniversary

However, he paused the order until 12 p.m. local time (1900 GMT) Friday — and the White House almost immediately launched an appeal that could make it all the way to the Supreme Court.

"Donald Trump will be relieved of his command at noon tomorrow," Newsom said in televised comments after the ruling was issued.