LOS ANGELES (AP) — A federal appeals court issued an order blocking a California law passed in 2025 requiring federal immigration agents to wear a badge or some form of identification.

The Trump administration filed a lawsuit in November challenging the law, arguing that it would threaten the safety of officers who are facing harassment, doxing, and violence, and that it violated the constitution because the state was directly seeking to regulate the federal government.

A three-judge panel of the 9th U.S. Circuit Court of Appeals issued an injunction pending appeal. It had already granted a temporary administrative injunction to block the implementation of the law while the appeal took place.

The measure was one of two major pieces of legislation enacted last fall aimed at reining in federal immigration agents after a sweeping crackdown on illegal immigration in Southern California in June. Advocates have raised concerns about masked agents conducting workplace raids or arresting people on the street, often without showing identification.

The other law would have banned most law enforcement officers from wearing masks, neck gaiters, and other facial coverings. It was blocked by a federal judge earlier this year on the grounds that it discriminated against the federal government because it did not apply to state troopers. The law allowed exceptions for undercover agents, protective equipment like N95 respirators, or tactical gear, and other scenarios where not wearing a mask would jeopardize operations.

At a hearing, Justice Department lawyers argued that the California identification requirement law sought to regulate the federal government, violating the Supremacy Clause of the Constitution.

The appeals court agreed unanimously, stating the law “attempts to directly regulate the United States in its performance of governmental functions.” The panel consisted of two Trump appointees and one Obama appointee.

California lawyers contended that the law applied equally to all law enforcement officers and argued that states could enforce “generally applicable” laws on federal agents. They emphasized that the law was vital for addressing public safety concerns, claiming that lack of visible identification could lead to misunderstandings and violence against officers.

As federal law enforcement activity increases, a rise in impersonation cases has prompted concerns about public safety. The appeals court emphasized that it needed to prioritize constitutional rights over public safety considerations.

First Assistant U.S. Attorney Bill Essayli referred to the injunction as a “huge legal victory.” California Attorney General Rob Bonta's office is currently reviewing the order, insisting that transparency and accountability are essential in law enforcement practices.