After four months of deliberation, Judge James Orenstein has ruled that the FBI can’t force Apple to access data on a locked iPhone in order to assist the law enforcement organization in an on-going investigation. The owner of the phone has already confessed to the crimes for which he was accused, but the FBI argues that the phone could contain important information for other investigations related to that case.

The FBI’s argument is based on a 200-year-old law called the All Writs Act, signed in 1789, which allows deferral courts to make third-parties cooperate with court orders. Judge Orenstein argued that the All Writs Act is not sufficient to justify making Apple work with the FBI in this or future cases when similar issues will arise. The Department of Justice is planning on appealing the decision, which could take it to the New York State Supreme Court.

The victory does counter a similar case wherein a judge ordered that Apple did have to help the FBI unlock a phone belonging to one of the San Bernardino shooters who killed 14 people in December. Then, as now, Apple has made the argument that software used in such way could result in weakening the security of their devices, allowing anyone to unlock any phone regardless of who it belongs to. FBI Director James Comey has said that such software would only work on a specific phone and that it wouldn’t pose a threat to others, but experts say this isn’t how the software works.

The ruling in New York is unrelated to that in California, but if Apple intends to appeal that decision, it could establish precedent in their favor. For a company like Apple, being put in a position where they have to put the security and trust of their users at risk could cause a lot of problems. Security issues are important to the people who use their devices, and being in such a position could cost them a lot of money.