(Image: file photo)

Apple vs. FBI take two, is over.

The Justice Dept. has said it has found a way to unlock the iPhone used by a New York drug dealer, and has withdrawn its application demanding that Apple helps in the case.

The news landed late in the day on Friday.

In a filing with the Brooklyn court, US Attorney Robert Capers said that an "individual provided the passcode to the iPhone at issue in this case" a day earlier.

"Late last night, the government used that passcode by hand and gained access to the iPhone," the letter said. "Accordingly, the government no longer needs Apple's assistance to unlock the iPhone, and withdraws its application."

It's not known who provided the passcode to the locked iPhone.

A separate document was filed with the court on Friday, but was under seal.

The phone in the New York case belonged to Jun Feng, who has pleaded guilty to drug and conspiracy charges. The Justice Dept. was still seeking access to the phone in an effort to get more information on other co-conspirators in the case.

The Brooklyn case was a near carbon copy of the highly charged and politicized case in California, after the terrorist attack killed 14 people in early December.

But the government eventually dropped its case against Apple, which refused to help federal agents break into the phone, after it found an found an "outside party."

Apple won the case in February after New York-based magistrate James Orenstein said that the government's use of the All Writs Act, a 227-year-old law, would not apply. In previous court filings, the iPhone and iPad maker had disputed the government's need for its help in unlocking the phone.

With the case now dropped, the court leaves Orenstein's decision intact -- which will likely cause headaches for the government invoking the All Writs Act in the future.

A spokesperson for Apple declined to comment.