James Comey, FBI director, has put a figure of over $1.34 million on the cost of hacking into the iPhone of the killer in the San Bernandino case.

Comey said that the cost of hacking into the phone owned by shooter Syed Rizwan Farook was more than he would earn in his remaining seven years and four months in his job, which with an annual salary of $183,000 (according to Reuters) came to $1.34 million.

At the Aspen Security Forum event in London, Comey said that the cost had been "worth it" and the controversy around the case had created a "marketplace" of people trying to "break into Apple 5C running iOS9", the FT reported.

In mid-February, US Magistrate Judge Sheri Pym had ruled that Apple had to provide the FBI with software to make it easier to hack into the phone. Apple appealed against the decision.

An unspecified third party came forward with a way of hacking into the phone, preventing the case from having to go to court, and meaning that Apple never had to undermine its own security.

While the FBI cited an unnamed third party as the source, the Yedioth Ahronoth newspaper reported that Israeli mobile forensics company Cellebrite had unlocked the iPhone for the FBI.

"Building a version of iOS that bypasses security in this way would undeniably create a backdoor," wrote Apple CEO Tim Cook in a letter to customers explaining the decision.

This battle between a tech company and a government is not a unique occurrence. In a case with some parallels to the Apple case BlackBerry recently came close to pulling out of Pakistan after the government there demanded access to the content of customers’ BES traffic and to BES servers.

BlackBerry recently provided the Canadian authorities with information in a case that led to a "major criminal organisation being dismantled".

Apple’s stand was supported by tech companies including Box, Google, Facebook and Microsoft.