A federal magistrate judge in Brooklyn on Monday rejected the government’s attempt to compel Apple to help unlock an iPhone in a narcotics case, handing the company a significant legal victory as a parallel dispute over the San Bernardino attack intensifies in California.

Judge James Orenstein ruled that the All Writs Act, a law dating to 1789, does not give courts sweeping authority to require a private technology company to bypass security on a customer’s device when Congress has considered but not enacted a more specific mandate. The decision concerns an older iPhone running an earlier operating system, but its reasoning challenges the central legal theory federal prosecutors are using in multiple device-access cases.

The Brooklyn dispute involves an iPhone 5 seized in an investigation of methamphetamine trafficking. Apple has said it is technically capable of extracting certain data from some older devices, yet it argues that capability does not make it an investigative arm of the government. Orenstein accepted that distinction. ABC News reported that the judge found the government’s proposed interpretation of the All Writs Act too broad and inappropriate where Congress had left the underlying policy unresolved.

An Old Statute Meets a New Security Architecture

The All Writs Act allows federal courts to issue orders necessary to support their jurisdiction, but it does not specify obligations for smartphone manufacturers. Prosecutors argue that the statute can fill gaps where no other law directly addresses a court’s need for assistance. Apple counters that the government is not filling a procedural gap; it is asking the judiciary to create a duty that Congress declined to impose.

Orenstein’s opinion gives that argument unusual force. As the Electronic Frontier Foundation’s analysis explained, the court viewed the government’s claim as an attempt to obtain through an expansive general statute what lawmakers had not authorized through targeted surveillance legislation. The judge also rejected the notion that Apple’s sale of a phone makes it sufficiently connected to every later criminal use of the device.

The American Civil Liberties Union said the ruling properly placed responsibility for a broad expansion of investigative power with Congress. Privacy advocates have warned that case-by-case orders can accumulate into a national policy without the open debate, technical scrutiny and limits that legislation would require.

The Justice Department is expected to appeal. Because Orenstein is a magistrate judge in the Eastern District of New York, his opinion does not bind the California court considering the San Bernardino device. It does, however, create a detailed judicial answer to the claim that the All Writs Act supplies an easy and settled solution.

San Bernardino Requires More Than Data Extraction

The California case presents a technically different demand. The FBI recovered an iPhone 5C used by Syed Rizwan Farook, one of the shooters in the December attack that killed 14 people. Investigators cannot attempt passwords at high speed because the operating system delays repeated guesses and may erase data after too many failed attempts. A magistrate judge has ordered Apple to create and sign special software that would disable those protections on the device.

Apple says writing that software would be qualitatively different from producing information already in its possession. In a public letter to customers issued February 16, Chief Executive Timothy D. Cook called the order a demand for a new version of the iPhone operating system that could bypass important security features. Once such a method exists, the company argues, the principle behind it cannot reliably be confined to one phone.

FBI Director James B. Comey has rejected the characterization that investigators want a universal “back door.” In remarks accompanying his congressional testimony, Comey described the dispute as part of a broader collision between strong encryption and lawful access to evidence. The bureau says it seeks a device-specific tool maintained and used by Apple, not the encryption keys for every user.

The technical disagreement is also an argument about scalability. Software can be copied, scrutinized and adapted even when a court order specifies one serial number. Apple contends that accepting a judicial power to require security-defeating code would invite similar demands from prosecutors around the country and eventually from foreign governments. The FBI responds that courts routinely compel third parties to provide limited assistance and can evaluate future cases individually.

Congress Confronts the Consequences

The House Judiciary Committee brought both positions into the same hearing room Tuesday. The panel’s summary of its “Encryption Tightrope” hearing framed the question as how to preserve lawful investigations without weakening the digital protections on which consumers, businesses and government agencies depend.

Apple General Counsel Bruce Sewell told lawmakers that the California order would force engineers to build a tool that does not exist. His written testimony argued that the case should not be treated as an isolated dispute because the authority claimed by the government would apply to other devices and other investigations. Comey told the committee that the bureau understands the value of encryption but cannot ignore evidence rendered inaccessible by design.

The hearing exposed no simple legislative compromise. A requirement that companies preserve exceptional access could create a target for criminals and foreign intelligence services. A rule protecting unbreakable encryption could leave courts with warrants they cannot execute. Members of both parties expressed sympathy for the San Bernardino investigation and concern about the precedent created by compelling code.

The Brooklyn ruling makes it harder to postpone that policy choice. The Electronic Privacy Information Center’s case summary noted that Orenstein treated Congress’s attention to encryption as evidence against assuming that a centuries-old statute silently resolved the issue. That reasoning invites lawmakers to define the limits directly rather than leaving them to inconsistent rulings.

Apple’s win is meaningful because it separates sympathy for an investigation from the scope of judicial power. Orenstein did not decide that phones are immune from search warrants, nor did he establish a constitutional right to inaccessible encryption. He decided that the government had not shown that this particular statute authorizes the assistance it demanded.

That distinction will shape the California fight, even though the facts and requested engineering differ. Apple can now point to a federal opinion warning that the government’s theory carries consequences far beyond one device. Prosecutors can answer that the San Bernardino phone involves a mass-casualty terrorism investigation and a narrower technical order.

Neither position eliminates the underlying trade-off. Smartphones now hold records that were once scattered across desks, filing cabinets and service providers, while strong encryption protects those same records from theft and surveillance. The Brooklyn decision ensures that any rule compelling manufacturers to defeat those protections will face more than a technical test. It will have to survive a debate over who may impose it, how far it reaches and what security cost the country is prepared to accept.