The U.S. Justice Department announced Monday it has successfully accessed data stored on the iPhone that belonged to the San Bernardino gunman without Apple's help, ending the court case against the tech company.

The surprise development effectively ends a pitched court battle between Apple and the Obama administration.

The government asked a federal judge to vacate a disputed order forcing Apple to help the FBI break into the iPhone, saying it was no longer necessary.

The court filing in U.S. District Court for the Central District of California provided no details about how the FBI did it or who showed it how.

“As the government noted in its filing today, the FBI has now successfully retrieved the data stored on the San Bernardino terrorist’s iPhone and therefore no longer requires the assistance from Apple required by this Court Order," DOJ spokeswoman Melaine Newman said in a statement. "The FBI is currently reviewing the information on the phone, consistent with standard investigatory procedures."

A law enforcement official said Monday night that DOJ no longer requires the assistance of Apple in unlocking the iPhone that belonged to San Bernardino gunman Syed Farook given that the third party method demonstrated to FBI earlier this month proved successful.

The official added that the decision to request that the order compelling Apple to assist FBI be vacated by the court for that same reason.

The law enforcement official said that FBI is currently reviewing the information on Farook’s iPhone and that the bureau will continue to explore every lead to make sure that all evidence in the San Bernardino terror attack is collected. The official would not comment on what FBI may have found on the phone as of now.

The official would not disclose any details about the method used to unlock the phone or the third party that demonstrated this method to FBI, only noting that the third party was outside the government.

The FBI is also has not disclosed what information may have been gleaned from the unlocking of the phone.

"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," Apple said in a statement. "As a result of the government’s dismissal, neither of these occurred. This case should never have been brought."

"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," the statement continued.

The surprise development also punctured the temporary perception that Apple's security might have been good enough to keep consumers' personal information safe even from the U.S. government — with the tremendous resources it can expend when it wants to uncover something.

The FBI used the technique to access data on an iPhone used by gunman Syed Farook, who died with his wife in a gun battle with police after they killed 14 people in San Bernardino, California, in December.

U.S. magistrate Sheri Pym of California last month ordered Apple to provide the FBI with software to help it hack into Farook's work-issued iPhone. The order touched off a debate pitting digital privacy rights against national security concerns.

Apple was headed for a courtroom showdown with the government last week, until federal prosecutors abruptly asked for a postponement so they could test a potential solution that was brought to them by an unidentified party the previous weekend.

Technical experts had said there might be a few ways an outsider could gain access to the phone, although the FBI had insisted repeatedly until then that only Apple had the ability to override the iPhone's security.

The case drew international attention and highlighted a growing friction between governments and the tech industry. Apple and other tech companies have said they feel increasing need to protect their customers' data from hackers and unfriendly intruders, while police and other government authorities have warned that encryption and other data-protection measures are making it more difficult for investigators to track criminals and dangerous extremists.

The withdrawal of court process also takes away Apple's ability to legally request details on the method the FBI used. Apple attorneys said last week that they hoped the government would share that information with them if it proved successful.

The encrypted phone was protected by a passcode that included security protocols: a time delay and self-destruct feature that erased the phone's data after 10 tries. The two features made it impossible for the government to repeatedly and continuously test passcodes in what's known as a brute-force attack.

As to whether DOJ will apply this method to other cases involving locked iPhones, a law enforcement official said Monday night that FBI is focused on the San Bernardino case and that they could not comment on the possibility of future disclosures at this time.

The official added that it would be premature to say anything about DOJ’s ability to access other phones through this method at this point, only adding that FBI knows that it works on the iPhone 5C that belonged to the San Bernardino gunman which was running iOS 9.

On working with Apple going forward, the official said that the goal has always been to work cooperatively with Apple and that DOJ will want to continue to work with Apple in the future

Fox News' Matt Dean and The Associated Press contributed to this report.