A U.S. federal appeals court has upheld the Pentagon’s decision to designate AI company Anthropic as a national security supply-chain risk, keeping the company excluded from military contracts.

The 2-1 ruling by the U.S. Court of Appeals in Washington, D.C. came Friday in a lawsuit brought by Anthropic after the Pentagon placed the company on its restricted list in March. Anthropic had challenged the designation and argued that its restrictions on how its AI technology could be used by the military were protected.

The Pentagon’s action followed Anthropic’s refusal to permit its AI systems to be used for autonomous weapons and mass surveillance. The court majority said the Defense Department had a reasonable basis for its national-security designation.

The dispute highlights the growing debate over how advanced artificial intelligence can be used in defense and national-security applications. AI companies and government agencies are increasingly negotiating limits around military applications, surveillance and autonomous systems.

Anthropic has said the Pentagon’s decision has affected its business and comes as the company prepares for a potential public offering. The ruling could further shape the relationship between major AI developers and the U.S. government as military demand for advanced AI systems expands.