By ALEXANDRA SEMENOVA

The legal battle between national security interests and personal privacy escalated last Monday after the Justice Department appealed a Brooklyn federal court ruling that prosecutors do not have the legal authority to force Apple to retrieve information from a suspected Queens drug dealer’s iPhone.

Magistrate Judge James Orenstein ruled Feb. 29 that the 1789 All Writs Act is not enough to justify the FBI’s demand that Apple extract information from a smartphone owned by the accused Jun Feng.

In response, prosecutors filed legal arguments Monday that called the ruling “an unprecedented limitation” on the government’s authority. The brief alleged that Apple is not being asked to do anything it is has not previously done or anything it is not capable of doing. Apple has assisted the FBI in extracting information from its devices in 70 previous incidents, according to prosecutors.

In asking for the court to override the magistrate judge’s ruling, federal authorities argued again that the All Writs Act of 1789 validates their call for Apple to unlock the smartphone.

It is the duty of the manufacturer to assist in extracting information from the device, according to prosecutors.

The battle between Apple and the government began in mid-February when Magistrate Judge Sheri Pym of the federal court for the Central District of California compelled Apple to create software that would give the FBI a “master key” to unlock an encrypted iPhone 5C that was used by one of the killers in the ongoing case of the San Bernardino terrorist attacks in December.

Apple declined to voluntarily help in accessing the phone.

According to Apple, operating systems before IOS 8 allowed the company to assist in accessing information from a passcode-locked device without having to unlock the phone. The iPhone obtained from the attack runs on IOS 8 and cannot be accessed unless its encryption is removed, which Apple executives have said severely threatens data security.

In the New York case of Jun Feng, the iPhone ran on IOS 7, and it would only take Apple a few hours to retrieve data from the phone because the operating system would not have to be unlocked.

But Apple “demurred” from court orders to unlock the iPhone in the New York case as well because the government’s invocation of the All Writs Act is a threat to the digital privacy of the public, Apple executives said in a conference call Monday.

“Rather than asking for legislative action through Congress, the FBI is proposing an unprecedented use of the All Writs Act of 1789 to justify an expansion of its authority,” Apple CEO Timothy Cook said in an open letter last month.

“We are challenging the FBI’s demands with the deepest respect for American democracy and a love of our country,” Cook wrote. “We believe it would be in the best interest of everyone to step back and consider the implications.”

Apple has rebutted federal prosecutors’ claims that its decryption demands are essential to fighting crime by asserting that developing a “backdoor” for FBI access creates a major security threat for iPhone users and interferes with public privacy altogether.

The government cannot hack the phone without risking the auto-erase feature and cannot involve a third party because it poses the same risk.

The rhetoric in the national debate between the FBI and Apple intensified Thursday in U.S. District Court in Los Angeles when federal authorities filed a motion seeking to compel Apple to assist the FBI in breaking into the iPhone, further invoking a debate over digital privacy rights and national security that is still in the works.

In the Brooklyn case, Orenstein wrote that he had to consider three factors in making his decision to authorize the motion to sustain the use of the All Writs Act in the case: the closeness of Apple’s relationship to the criminal conduct, the burden such an order would impose on the company, and whether it is necessary to impose that burden, according to court documents.

“I conclude that none of those factors justifies imposing on Apple the obligation to assist the government’s investigation against its will,” Orenstein wrote. “I therefore deny the motion.”