The government sought access to the phone in the Brooklyn case in October, months before a judge in California ordered Apple to take special measures to give the government access to the phone used by one of the shooters in the San Bernardino, California, attacks.

US Magistrate Judge James Orenstein in Brooklyn ruled that he did not have the legal authority to order Apple to disable the security of an iPhone that was seized during a drug investigation.

Apple rivals take cautious line on encryption issue

His ruling echoed many of the arguments that Apple has made in the San Bernardino case, particularly his finding that a 1789 law called the All Writs Act cannot be used to force Apple to open the phone.

Orenstein also found that Apple was largely exempt from complying with such requests by a 1994 law that updated wiretapping laws.