As Apple’s battle with the FBI drags on this week, a judge in New York has added a new wrinkle to the case. A magistrate judge in New York today has ruled that the government, using the All Writes Act, cannot force Apple to unlock an iPhone. This specific case this judge presides over is a drug trafficking investigation, which was mentioned last week as one of the more than a dozen other cases in which the government is asking Apple to help it obtain data from a locked iPhone.

The judge, James Ornstein, says in his ruling that the government has failed to provide any reasoning that the All Writes Act gives it the ability to force Apple to create a tool to obtain data from a locked iPhone. In this specific case, the iPhone in question belonged to a meth dealer (via the WSJ)

I conclude that under the circumstances of this case, the government has failed to establish either that the AWA permits the relief it seeks or that, even if such an order is authorized, the discretionary factors I must consider weigh in favor of granting the motion.

After reviewing the facts in the record and the parties’ arguments, I conclude that none of those factors justifies imposing on Apple the obligation to assist the government’s investigation against its will.

Furthermore, the judge noted that how the government is interpreting the All Writs Act is so far-reaching “as to cast doubt on its constitutionality if adopted.” Ornstein added that in this day in age, issues with technology privacy should be decided by today’s lawmakers, not by a law created in 1789:

“It would betray our constitutional heritage and our people’s claim to democratic governance for a judge to pretend that our Founders already had that debate, and ended it, in 1789,’’ Judge Orenstein wrote.

While the circumstances in this case are far different than the ones in the San Bernardino case, the ruling gives Apple an upper hand going into its legal fight with the FBI. Apple lawyer Bruce Sewell is set to testify before Congress tomorrow.

You can follow on Twitter or join our Facebook page to keep yourself updated on all the latest from Apple and the Web.