LOS ANGELES (AP) — A federal appeals court issued an order blocking a California law requiring federal immigration agents to wear a badge or some form of identification. The law was challenged by the Trump administration, which argued it threatened the safety of officers amid a climate of harassment and violence, violating the Constitution by regulating the federal government directly.

On Wednesday, a three-judge panel of the 9th U.S. Circuit Court of Appeals granted an injunction pending appeal, having already issued a temporary order to halt the law's implementation.

This law was part of two significant measures passed last fall aimed at addressing concerns over aggressive immigration enforcement by federal agents, particularly following a crackdown in Southern California in June. Critics had raised alarms over agents conducting operations without visible identification, increasing public vulnerability to impersonation and subsequent violence.

Another law aimed at restricting local law enforcement from wearing facial coverings was previously halted by a federal judge, who claimed it unfairly targeted federal officials.

California's legal representatives claimed the identification mandate was crucial for public safety to differentiate law enforcement from impersonators, especially amid a documented rise in violent impersonation cases linked to Immigration and Customs Enforcement activity.

The court, however, did not delve into these public safety arguments in its ruling, focusing instead on the constitutional violations posed by the state law. They stated that all citizens have a stake in ensuring constitutional rights are upheld.

The injunction has been hailed as a significant victory for the federal government. California Attorney General Rob Bonta's office is currently reviewing the ruling.