NEW YORK (AP) — By prosecutors' count, Apple helped federal law enforcement agents extract information from iPhones in criminal investigations at least 70 times in seven years before suddenly expressing a change of heart last fall in an otherwise ordinary drug case out of Brooklyn.
Asked to help break into the phone of a suspected methamphetamine dealer, Apple refused to cooperate, taking a stand that foreshadowed last week's clash with the federal government over a phone belonging to one of the San Bernardino, California, attackers.
"Public sensitivity to issues regarding digital privacy and security is at an unprecedented level," the company's lawyers said in a court filing. Forcing Apple to extract the data, they said, "could threaten the trust between Apple and its customers and substantially tarnish the Apple brand."
The reversal stunned prosecutors, but they quickly girded for a broader fight.
Even after the defendant in the drug case, Jun Feng, pleaded guilty at the end of October, both Apple and the Justice Department lawyers told the court they still wanted a ruling.
The issue wasn't just that phone, they wrote, but the millions of other Apple devices with even tougher encryption technology that might someday be seized in connection with a criminal case.
At an October court hearing, Apple attorney Marc Zwillinger said the company feared the government would try "pushing the law to a new frontier" by forcing the company to modify software or change its products.
"We're being forced to become an agent of law enforcement, and we cannot be forced to do that with our old devices or with our new devices," he said.
A decision still hadn't come when the case was overtaken by a similar one in California, where Apple had refused to help the FBI break down the security of a new version of its operating system so agents could look inside the iPhone of a shooter in the Dec. 2 massacre in San Bernardino that killed 14 people.
The technical and legal issues in that case are more complex. Apple has maintained that its iOS 8 operating system is so secure that even it can't get at data inside the phones without creating sophisticated software to bypass a self-destruct feature. The phone in the Brooklyn case didn't have those security features.
But at the heart of both cases is the government's reliance in recent terrorism investigations on a 1789 law, called the All Writs Act, which was written to compel action when other laws do not provide the authority.
Apple's surprising October opposition in the Brooklyn case arose in part because a U.S. magistrate judge, James Orenstein, invited the Cupertino, California, company to challenge the government's use of the law. He asked whether the government's request was too burdensome.
Orenstein questioned the government's application of the law, saying "using an aggressive interpretation of that statute's scope to short-circuit public debate on this controversy seems fundamentally inconsistent with the proposition that such important policy issues should be determined in the first instance by the legislative branch after public debate."
In court papers, Apple said it did have the technical capability to retrieve some data from the drug dealer's phone, largely because it was running an older operating system. And it could afford to send Apple personnel to testify in any related court case. Zwillinger told Orenstein the company had been called to testify in about 20 instances in which it had helped to extract information from an iPhone.
Yet while it had cooperated in the past, Zwillinger said, customer privacy expectations had changed.
"Right now, Apple is aware that customer data is under siege from a variety of different directions. Never has the privacy and security of customer data been as important as it is now," he said.
Apple said forcing it to extract data from phones would be like forcing a safe manufacturer to travel the country, picking locks at the government's whim.
Orenstein called the safe-cracking analogy "fanciful" but said he was "troubled" that Apple was changing course after repeatedly helping the government get access to iPhones in past investigations.
Assistant U.S. Attorney Saritha Komatireddy told the judge that Apple's position was a "stunning reversal."