A Brooklyn magistrate judge has denied prosecution attempts to force Apple Inc. to assist with law enforcement efforts to unlock a smartphone in a drug case.

Eastern District Magistrate Judge James Orenstein concluded Monday that a centuries-old law invoked by the government provided no basis to compel the computer maker’s assistance.