The US Department of Justice has filed a motion seeking to compel Apple Inc to comply with a judge's order for the company to unlock the iPhone belonging to one of the shooters involved in the attack in San Bernardino, California last December.

The FBI is seeking the tech giant's help to access Rizwan Farook’s phone, which is encrypted.

The company so far has resisted, and yesterday was granted three extra days to respond to the order.

The FBI and prosecutors are seeking Apple's assistance to read the data on an iPhone 5C that had been used by Farook, who along with his wife, Tashfeen Malik, carried out the shootings that killed 14 people and wounded 22 others.

Apple and the Obama administration look to be on track for a major collision over computer security and encryption after a federal magistrate judge in Los Angeles handed down an order on Tuesday requiring Apple to provide specific software and technical assistance to investigators.

Apple Chief Executive Tim Cook called the request from the Federal Bureau of Investigation unprecedented.

Senior Apple executives said that the right place to find a solution to the encryption debate was in the US Congress.

The executives said they were stunned that the request to write software code to disable the pass code protections on the phone was happening in the United States and not another country with lesser traditions of privacy and civil liberties.

Other tech giants such as Facebook, Twitter and Google have rallied to support Apple.

Apple has retained two prominent, free-speech lawyers to do battle with the government, according to court papers.

Tim Cook pictured during a recent visit to Ireland

Government lawyers from the US Justice Department have defended their request in court papers by citing various authorities, such as a 1977 US Supreme Court ruling that upheld an order compelling a telephone company to provide assistance with setting up a device to record telephone numbers.

The high court said then that the All Writs Act, a law from 1789, authorised the order, and the scope of that ruling is expected to be a main target of Apple when it files a response in court by early next week.

But Apple will likely also broaden its challenge to include the First Amendment's guarantee of speech rights, according to lawyers who are not involved in the dispute but who are following it.

Compared with other countries, the United States has a strong guarantee of speech rights even for corporations, and at least one court has ruled that computer code is a form of speech, although that ruling was later voided.