A federal judge in California has dealt the Trump administration a stinging rebuke, ruling that Defense Secretary Pete Hegseth’s decision to brand Anthropic a supply-chain risk was “unlawful retaliation” that violated the First Amendment. U.S. District Judge Rita Lin didn’t mince words in her Thursday evening ruling, calling the designation “arbitrary and capricious” and finding that Anthropic was denied due process under the Fifth Amendment.

The backstory matters here. Earlier this year, Hegseth and President Trump ordered all federal agencies to stop working with the Claude maker after Anthropic refused to let the Pentagon use its models for fully autonomous weapons or mass surveillance of American citizens. The Pentagon insisted it only wanted lawful uses, but Lin saw through the posturing. She noted the government’s “words and deeds” showed a clear intent to make “a public example out of Anthropic for its ‘arrogance’ in criticizing the government.”

The ruling highlights some glaring inconsistencies in the government’s position. Hegseth simultaneously proposed applying the Defense Production Act to Anthropic — which would classify the company as essential to national security — while also labeling it a threat. The DOD kept pursuing a contract with Anthropic and even collaborated with its new Mythos model on cybersecurity. That’s not how you treat a genuine supply-chain risk.

Lin also confirmed what Anthropic has argued all along: the company “undisputedly lacks” any backdoor access to its technology once it’s handed to the DOD. Her blunt conclusion — “The empty invocation of national security is not a blank check to punish and retaliate against government critics” — sends a clear signal to any agency tempted to weaponize procurement rules against companies that refuse to compromise on safety. Anthropic still has a second complaint pending in Washington, D.C., so this fight isn’t fully over. But for now, the court has drawn a bright line between genuine security concerns and political score-settling.