WASHINGTON — A judge in California on Tuesday ordered Apple to help the FBI unlock an iPhone used by one of the attackers in the assault in San Bernardino that killed 14 people in December.
The ruling handed the FBI a potentially important victory in its long-running battle with Apple and other Silicon Valley companies over the government's ability to get access to encrypted data in investigations. Apple has maintained that requiring it to provide the "keys" to its technology would compromise the security of the information of hundreds of millions of users.
The FBI says that its experts have been unable to get into the iPhone 5c used by Syed Rizwan Farook, who was killed by the police along with his wife, Tashfeen Malik, after they attacked Farook's co-workers at a holiday gathering.
Prosecutors said in a court filing that Apple had the "exclusive" means to bypass the security features on the phone, but that the company "has declined to provide that assistance voluntarily." FBI experts say that because of the phone's security features, they risk losing the data permanently after 10 failed attempts to enter the password.
The Justice Department had secured a search warrant for the phone, which is owned by Farook's former employer, the San Bernardino County Department of Public Health. But prosecutors said they saw little choice but to seek the additional order compelling Apple's assistance.
In an unusually detailed directive, Magistrate Judge Sheri Pym of the U.S. District Court for the District of Central California ordered Apple to provide "reasonable technical assistance" to the FBI in unlocking the phone. That assistance should allow investigators to "bypass or erase the auto-erase function" on the phone, among other steps, she wrote.
A spokesman for Apple could not be immediately reached for comment.
Prosecutors said the contents of the phone could provide crucial evidence about the attackers' communications and contacts before the shooting.
The husband and wife appear to have been motivated by a devotion to violent jihad, but the authorities have not connected them publicly to any extremists overseas. Enrique Marquez, a friend and former neighbor, has been charged with providing them with the assault weapons used in the attack and conspiring with Farook in an earlier plot that was not carried out.
Eileen M. Decker, the U.S. attorney in Los Angeles, where the investigation is being handled, said the effort to compel Apple's technical cooperation marked "another step — a potentially important step — in the process of learning everything we possibly can about the attack in San Bernardino."
Prosecutors "have made a solemn commitment to the victims and their families that we will leave no stone unturned as we gather as much information and evidence as possible," Decker said.
James B. Comey, the FBI director, has been at odds with Apple and other technology companies for months over whether they should provide de-encryption technology for their products. Without it, he has argued, the bureau is at risk of "going dark" in its investigations. The Democratic presidential candidate Hillary Clinton and most of the Republican hopefuls support Comey's stance.
Apple and other technology companies say that creating an opening in their products for government investigators would also create a vulnerability that Chinese, Iranian, Russian or North Korean hackers could exploit.
Apple, arguing in December against a British proposal that could force it to provide the government with a way into iPhone communications, said the dispute should not be seen "as an all-or-nothing proposition for law enforcement."
"Nothing could be further from the truth," Apple argued. "Law enforcement today has access to more data — data which they can use to prevent terrorist attacks, solve crimes and help bring perpetrators to justice — than ever before in the history of our world."
Apple said that "we believe it would be wrong to weaken security for hundreds of millions of law-abiding customers so that it will also be weaker for the very few who pose a threat."