Washington: A federal magistrate-judge in New York city has ruled that the government can't force Apple to hack an iPhone to investigate a drug dealer.
It's a win for Apple, which is being pressured by federal law enforcement agents to help it break into iPhones in at least 13 instances across the country.
Apple says doing the federal government's bidding would undermine the security features in hundreds of millions of iPhones around the world, CNN reported.
So far, the justice department was relying on the All Writs Act, 1789, which gives judges broad discretion in carrying out the law.
On Monday, Judge James Orenstein said federal investigators cannot use that law to pull this off.
The US government's argument does not justify "imposing on Apple the obligation to assist the government's investigation against its will", the judge said.
The judge said law enforcement was inappropriately trying to use powers that it had not been given by the US Congress.
"The question is not whether the government should be able to force Apple to help it unlock a specific device," Orenstein said.
"It is instead whether the All Writs Act resolves that issue and many others like it yet to come... I conclude it does not," the judge ruled.
The case involves a methamphetamine dealer, Jun Feng, who was arrested in 2014 and cut a plea deal with prosecutors.
The Drug Enforcement Agency in 2015 got a search warrant to look through Feng's iPhone 5C to track down his fellow drug dealers and customers, but the device was running the iOS 7, and agents could not crack the passcode to see the data inside.
The agency sought Apple's help. Apple initially said it would help. The US Department of Justice claims Apple was being inconsistent.
"Apple... only changed course when the government's application for assistance was made public by the court," the department said on Monday.
An Apple senior executive said on Monday that the company did offer to help -- but only if the US government makes a lawful request.
"We will produce information when there is a lawful order to do so," the executive said. "But Judge Orenstein, on his own behalf, said he would not issue this order."