The US Department of Justice withdrew strong legal charges against Apple on Monday, saying officials successfully broke data stored on an encrypted iPhone used by one of the Sand Bernardino attackers.
Until last week, the US government had insisted it had no way to break the phone used by Rizwan Farook except to force Apple to write new software that would disable the password protection.
The Justice Department owned a court order last month directing Apple to create that software. But the company fought back, claiming that the order was an overreach by the government and would undermine computer security for everyone.
"This case should never have been brought," Apple said in a statement, late on Monday.
"We will continue to help law enforcement with their investigations, as we have done all along, and we will continue to increase the security of our products as the threats and attacks on our data become more frequent and more sophisticated." it added.
The encrypted iPhone was used by Farook, one of the husband-and-wife shooters in the San Bernardino, California, rampage in December in which 14 people were killed and 22 wounded. The couple died in a shootout with police confrontation
US officials said last week they were hopeful they would be able to unlock the iPhone without help from Apple.
Eileen Decker, the top federal prosecutor in Los Angeles, said in a statement on Monday that the government's request to Apple was part of its "solemn commitment" to the victims.
"Although this step in the investigation is now complete, we will continue to explore every lead, and seek any appropriate legal process, to ensure our investigation collects all of the evidence related to this terrorist attack," Decker said.
The Justice Department said in a two-page court filing on Monday, the government "no longer requires" Apple's assistance. It told a federal magistrate in Riverside, California, to dropped her order compelling Apple to assist.
Apple had argued that the government request would create a "back door" to phones that could be abused by criminals and governments, and that Congress has not given the Justice Department authority to make such a demand.
Tech industry leaders including Google, Facebook and Microsoft and more than two dozen other companies filed legal briefs supporting Apple. The Justice Department received support from law enforcement groups and six relatives of San Bernardino victims.