Apple has been ordered to help the FBI to unlock the iPhone of one of the San Bernardino shooters
Apple has been ordered to help the FBI to unlock the iPhone of one of the San Bernardino, California shooters, but the firm says it will oppose it.
FBI director James Comey said his agents have been locked out of one of the killer's phones since the mass shootings in December last year.
A judge has ordered Apple to develop a workaround for its encryption software, but Apple boss Tim Cook said in a statement that the move would "threaten the security of our customers".
Agents want to find out how the murderous couple were radicalised and who they had been in touch with before the rampage.
Apple began making iPhones with additional encryption software in 2014, technology which they say they cannot even unlock with a court order.
Federal judge Sheri Pym has ordered Apple to comply with a workaround which would not actually mean that encryption would have to be turned off.
Instead it wants Apple to make it easier for federal agents to randomly guess the suspect's iPhone passcode.
A built-in security feature slows down anyone trying to repeatedly guess passcodes - typically a four-digit number - to unlock the phone.
Apple says the system means it would take someone more than five years to guess every possible code for a single device.
But a court order says the slowing down feature must be turned off, and ordered Apple to disable any auto-erase functions which are triggered by repeated failed attempts to unlock the phone.
To achieve this, Apple will have to write a new program, which FBI agents would then install on the phone.
Mr Cook's statement said: "The government suggests this tool could only be used once, on one phone. But that’s simply not true.
"Once created, the technique could be used over and over again, on any number of devices. In the physical world, it would be the equivalent of a master key, capable of opening hundreds of millions of locks - from restaurants and banks to stores and homes.
"No reasonable person would find that acceptable."
Syed Farook and Tashfeen Malik shot dead 14 people and wounded 21 others in San Bernardino on 2 December.
Farook, 28, and Malik, 29, were killed hours later in a gun battle with police.