Apple has been ordered to help the FBI unlock the iPhone of one of the San Bernardino shooters.

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.

Agents want to find out how the murderous couple were radicalised and who they had been in touch with before the rampage.

It is the latest salvo between law enforcement agencies and tech firms over the issue of encryption.

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.

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.