WASHINGTON ( CNET ) – The U.S. Supreme Court has ruled in favor of digital privacy. In a 5-4 decision on Friday the justices decided that police need warrants to gather phone location data as evidence for trials. The Supreme Court reversed and remanded the Sixth Circuit court’s decision. 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 is not 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 that 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 pointed out that 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. Carpenter’s attorneys, including lawyers from the American Civil Liberties Union, argued before the Supreme Court that cellphone location data constitutes sensitive digital records and should be protected under the Fourth Amendment. “This is a groundbreaking victory for Americans’ privacy rights in the digital age,” ACLU attorney Nathan Freed Wessler, who argued the case, said in a statement. “The Supreme Court has given privacy law an update that it has badly needed for many years, finally bringing it in line with the realities of modern life. The government can no longer claim that the mere act of using technology eliminates the Fourth Amendment’s protections.” Phone location data is a hot button issue for privacy advocates. In May, Sen. Ron Wyden, a Democrat from Oregon, asked phone service providers why they were giving away location data to Securus Technologies, a service that monitors calls to prison inmates, which police could use to track anybody’s phone in the US, without a warrant. The Federal Communications Commission opened an investigation into LocationSmart in May this year, a company that boasted that it could find any phone in the US without needing special permission. Wyden said Friday’s ruling was a “welcome step” for privacy and fighting against the expanding power of government surveillance. “The court’s recognition that digital devices can generate ‘near-perfect surveillance’ of a person’s private life is a validation of the vital protections against unreasonable search and seizure provided by our Constitution,” the senator said. The losing argument was that phone companies can provide customers’ data to law enforcement because they own those records, not the person. During the trial, US Deputy Solicitor General Michael Dreeben told the Supreme Court that people agree to hand over their information to providers for their service. “It is asking a business to provide information about the business’ own transactions with a customer,” Dreeben said in November. Before the trial took place, major tech companies, including Apple, Facebook and Google, filed a friend-of-the-court brief with the Supreme Court, urging the justices to make it harder for law enforcement officials to obtain individuals’ data without a warrant. While the decision sets a ruling for historical GPS data, the Supreme Court said it does not apply to security cameras, business records or real-time location tracking.