The US Supreme Court has ruled in favor of digital privacy. In a 5-4 decision on Friday, the justices said police need warrants to gather phone location data as evidence for trials. That reversed and remanded a decision by the Sixth Circuit Court of Appeals. Carpenter v. United States is the first case about phone location data that the Supreme Court has ruled on. That makes it a landmark decision regarding how law enforcement agencies can use technology as they build cases. The court heard arguments in the case on Nov. 29. The dispute dates back to a 2011 robbery in Detroit, after which police gathered months of phone location data from Timothy Carpenter’s phone provider. They pulled together 12,898 different locations from Carpenter, over 127 days. The legal and privacy concern was that police gathered the four months’ worth of Carpenter’s digital footprints without a warrant. A Sixth Circuit Court of Appeals judge ruled that cellphone location data isn’t protected by the Fourth Amendment, which forbids unreasonable search and seizure, and therefore didn’t require a warrant. In the Supreme Court’s ruling, Chief Justice John Roberts wrote the government’s searches of Carpenter’s phone records were considered a Fourth Amendment search. “The government’s position fails to contend with the seismic shifts in digital technology that made possible the tracking of not only Carpenter’s location but also everyone else’s, not for a short period but for years and years,” he wrote. Roberts said allowing government access to historical GPS data infringes on Carpenter’s Fourth Amendment protections and expectation of privacy, by providing law enforcement with an “all-encompassing record” of his whereabouts. He added that historical GPS data presents an “even greater privacy risk” than real-time GPS monitoring.