Jon Swartz, and Kevin McCoy

USA TODAY

NEW YORK Apple is saying no to the government — again.

In a legal filing late Friday, the tech giant argued it should not be compelled to aid federal law enforcement officials who seek to extract data from a confessed methamphetamine trafficker's iPhone because they have not exhausted all means to bypass the unit's built-in security code.

The company's lawyers also contended that the Department of Justice misinterpreted the All Writs Act, the 1789 statute that government lawyers used as the legal basis for asking a Brooklyn federal court to compel Apple's assistance.

Apple filed the legal brief in response to the government's appeal of a March ruling in which Brooklyn Magistrate Judge James Orenstein rejected federal prosecutors' application.

"The government has utterly failed to satisfy its burden to demonstrate that Apple’s assistance in this case is necessary," Apple said in the 45-page filing. "The government has made no showing that it has exhausted alternative means for extracting data from the iPhone at issue here."

The filing is the latest development in an escalating and closely-watched personal privacy vs. law enforcement security legal struggle that pits federal investigators against tech firms and cyber providers. The New York drug case could set a legal precedent for other cases that law enforcement officials are pursuing against Apple and other tech providers over encryption in widely used electronic devices.

In a more high-profile California case, Apple fought federal prosecutors in court and in the public eye in a battle over the iPhone used by San Bernardino terrorist shooter Syed Farook. The company argued that FBI investigators should not be allowed to require Apple to override its own passcode software installed on the company's iPhones.

The Department of Justice withdrew its application in that case last month after the FBI said it was able to bypass the password protection and extract the contents of Farook's iPhone with the help of an undisclosed outside party.

Responding to Apple's latest court filing, the Department of Justice argued that the All Writs Act specifically authorizes courts to require private firms to assist in carrying out search warrants.

“Apple expressly agreed to assist the government in accessing the data on this iPhone — as it has at least 70 times before in similar circumstances — and only changed course when the government’s application for assistance was made public by the court," said Emily Pierce, a Department of Justice spokeswoman. "Indeed, Apple has said it would take them only a few hours to open this kind of phone, because they already have mechanism that would allow them to do so.”

The New York federal court case focuses on Jun Feng, a Queens, N.Y. defendant who pleaded guilty in October to a methamphetamine conspiracy. Authorities indicated they sought access to his iPhone 5 in a bid to investigate other aspects of the alleged plot, including whether others, not yet known to the government, may have been involved.

Apple doesn’t have to unlock drug dealer’s iPhone, judge says

Orenstein ruled in March on the government's request for a court order that would have forced Apple to bypass the security passcode on the Feng's iPhone. The judge wrote that the provisions of the All Writs Act didn't support "the necessity of imposing such a burden” on the company.

The Department of Justice appealed the ruling to Brooklyn U.S. District Judge Margo Brodie.

Federal prosecutors argued the Constitution permits reasonable searches, including those where the government has a warrant.

Follow USA TODAY San Francisco Bureau Chief @jswartz and reporter Kevin McCoy from New York @kevinmccoynyc