A federal appeals court ruled Thursday that the Trump administration can continue using National Guard troops in response to protests in Los Angeles over federal immigration raids. President Trump reacted to the decision by calling it a major win for the country, writing on Truth Social that the ruling was a “great decision” and a validation of his efforts to restore order. The administration has federalized 4,000 National Guard soldiers without California’s approval and mobilized more than 700 Marines to help manage unrest sparked by mass deportation actions.

California Governor Gavin Newsom had filed a lawsuit against the administration in an attempt to stop the deployment, arguing the president overstepped his authority. Trump, in his response, criticized the governor’s leadership, stating that the issue extends beyond just California. He wrote that if cities and citizens across the U.S. need protection, the federal government must be prepared to step in when local authorities are unable to do so.

The 9th U.S. Circuit Court of Appeals reversed an earlier ruling from a lower court that had sided with Newsom. In its unsigned opinion, the court said it was likely the president had acted within his statutory powers to federalize the National Guard. The opinion emphasized that appropriate deference must be given to the president’s judgment in such matters and suggested that his actions were likely legal under federal law.

This decision comes after the same appeals court last week temporarily allowed the deployment to continue, pausing an earlier ruling by U.S. District Judge Charles Breyer. Breyer had sided with Newsom and blocked the deployment while the matter was under review. The Pentagon clarified afterward that the troops would not be conducting law enforcement duties at the protests but would instead focus on protecting federal personnel and property.