Updated

Apple said Friday it wants a New York judge to uphold a magistrate’s ruling that the government has no authority to compel the company’s help to get data from a locked iPhone in a federal drug case.

The tech giant has been locked in a battle with the Justice Department over whether the government can force Apple employees to help investigators open locked iPhones.

The most recent skirmish happed in February after federal authorities wanted Apple’s help to unlock the iPhone the terrorist involved in the San Bernardino shooting, which left 14 dead. However, they dropped that demand once the FBI found another way into the phone.

A third party helped unlock Syed Farook’s phone. The FBI said the technique only works on certain iPhones and can’t be used on many others, including the one at issue in a Brooklyn federal drug case.

Federal prosecutors in Brooklyn are seeking a court order to force Apple to help them extract data from an iPhone taken from a drug suspect who has since pleaded guilty, The Wall Street Journal reported. Magistrate Judge James Orenstein ruled in February that the government didn’t have the authority to compel Apple to help agents extract data from phones.

“The government has utterly failed to demonstrate that the requested order is necessary to effectuate the search warrant, including that it exhausted all other avenues for recovering the information it seeks,’’ Apple said in a letter to U.S. District Judge Margo Brodie. ““Before the government demands that Apple do the work of law enforcement, the government must offer evidence that it has performed an ‘exhaustive search’ and that it remains unable to obtain the data it seeks without Apple’s assistance.’’

According to The Wall Street Journal, an Apple attorney had previously said the company would try to get the FBI to answer questions about its phone-hacking efforts. However, the company told the court Friday “There is no evidence in the record that the government consulted with any other governmental entities or third parties.”

The Justice Department is hoping to win more court rulings upholding its authority to compel companies like Apple to assist in investigations by opening devices or decrypting phone data.

The Journal reported that both sides are preparing for the issue to eventually reach the Supreme Court.

This case involves an iPhone5s that was seized in 2014 from Jun Feng as part of a drug investigation. Feng pleaded guilty last year, but both sides agreed the legal dispute over the phone must be solved.

The Justice Department seeks a court order compelling Apple to help DEA agents extra data off the iPhone. Prosecutors want to get into the iPhone because, they say, the phone might contain evidence of additional crimes or suspects.

The Associated Press contributed to this report.

Click for more from The Wall Street Journal.