The ruling gives the tech giant an advantage in a controversial case involving a suspect in a fatal terror attack.

Authorities argued that a law applied in this case that allowed judges to issues orders when other legal opportunities didn’t exist. But the judge in the New York saw it differently.

"I conclude that none of those factors justifies imposing on Apple the obligation to assist the government's investigation against its will," Judge James Orenstein said in his ruling.

Orenstein's decision comes at a time when a national debate puts Apple against the federal government, which is attempting to force the California-based company to work with the FBI to unlock an iPhone believed to belong to Syed Rizwan Farook, one of the deceased suspects in the San Bernardino, California, shooting that killed 14 victims last December.

While Apple argues that creating backdoor software for the phone would endanger the private security of millions of iPhone users around the world, the U.S. government said unlocking would the device would be limited only to the San Bernardino case.

The case has become a debate about national security versus personal privacy, alluded to by Orenstein in his decision.

"How best to balance those interests is a matter of critical importance to our society, and the need for an answer becomes more pressing daily," he said.

“That debate must happen today, and it must take place among legislators who are equipped to consider the technological and cultural realities of a world their predecessors could not begin to conceive," he added.

Apple filed a motion last week to vacate a California court order compelling it to assist the FBI to unlock the iPhone in the San Bernardino case, claiming that the initial court order violates the company’s constitutional rights.

Anadolu Agency