Apple Inc Chief Executive Tim Cook said his company opposed a demand from a US judge to help the FBI break into an iPhone recovered from one of the San Bernardino shooters.
Cook said that the demand threatened the security of Apple's customers and had "implications far beyond the legal case at hand."
Judge Sheri Pym of US District Court in Los Angeles said on Tuesday that Apple must provide "reasonable technical assistance" to investigators seeking to unlock data on an iPhone 5C that had been owned by Syed Rizwan Farook.
In a, Cook said the FBI had asked the company to build "a backdoor to the iPhone".
"The government is asking Apple to hack our own users and undermine decades of security advancements that protect our customers — including tens of millions of American citizens — from sophisticated hackers and cybercriminals," he said.
"We can find no precedent for an American company being forced to expose its customers to a greater risk of attack."
Related reading
Hack San Bernardino killer's phone: Apple