The case demanding Apple to unlock a terrorist's iPhone for the FBI should never have been brought to court, the California company has said. It would have set a "dangerous precedent" the firm said in a statement after the FBI revealed it had finally unlocked the phone without Apple's help.

A public dispute ended on 28 March when the FBI announced it had gained access to the iPhone 5C used by one of the San Bernardino shooters. Days earlier it was revealed the FBI had sought help from Israeli company Cellebrite to break through its passcode. It has not been revealed what, if anything, was found on the handset.

'A dangerous precedent'

In response to the phone being unlocked, Apple said in a statement: "From the beginning, we objected to the FBI's demand that Apple build a backdoor into the iPhone because we believed it was wrong and would set a dangerous precedent. As a result of the government's dismissal, neither of these occurred. This case should never have been brought."

Apple said it will continue to help with law enforcement and their investigations, as it always has, but it will also "continue to increase the security of our products as the threats and attacks on our data become more frequent and more sophisticated". The iPhone maker said it "believes deeply that people in the United States and around the world deserve data protection, security and privacy. Sacrificing one for the other only puts people and countries at greater risk."

Looking at the case more generally and the debate it sparked, the iPhone maker concluded: "This case raised issues which deserve a national conversation about our civil liberties, and our collective security and privacy. Apple remains committed to participating in that discussion." Clearly, Apple feels it has won the battle, but a war between surveillance and privacy will rage on.

The FBI and US government must now decide whether or not they want to tell Apple how the iPhone was unlocked. This would help Apple patch a security hole exploited to access the phone, which would in turn likely make unlocking future phones more difficult.