In a 5-4 decision issued Friday, the Supreme Court of the United States ruled that if the government wants to collect a suspect’s cell-site location information (CSLI)—detailed, granular data that shows where a person is every few seconds—it needs a warrant to do so.

"Accordingly, when the Government tracks the location of a cell phone it achieves near perfect surveillance, as if it had attached an ankle monitor to the phone’s user," Chief Justice John Roberts wrote in the majority opinion.

However, the court also suggested that there was a seeming arbitrary line of six days, ruling that law enforcement certainly definitely needed a warrant to get CSLI for more than that amount of time. The majority of the Supreme Court justices did not fully explain why they drew the line there, much to the frustration of the dissenting minority.

The court notably declined to overturn the controversial "third-party doctrine," the 1970s-era legal precedent that found there was no "reasonable expectation of privacy" in data collected by a third party, like a phone company. The third-party doctrine, which was created by two cases known as Smith and Miller, was the underpinning for the National Security Agency’s Section 215 metadata program, which was exposed by former contractor Edward Snowden.

Building on two other previous pro-privacy decisions that the court reached in recent years, the majority found that cell phones are different.

"They give the Government near perfect surveillance and allow it to travel back in time to retrace a person’s whereabouts, subject only to the five-year retention policies of most wireless carriers," he wrote.

"But there is a world of difference between the limited types of personal information addressed in Smith and Miller and the exhaustive chronicle of location information casually collected by wireless carriers."

This case, Carpenter v. United States, involves a man convicted of six robberies in Ohio and Michigan. Law enforcement was able to obtain 127 days of his CSLI without a warrant. Tim "Little Tim" Carpenter was represented at the Supreme Court by the American Civil Liberties Union and had support from numerous tech companies.

One constitutional law professor, Elizabeth Joh of the University of California Davis, called this opinion "sweeping."

So after a very quick look, Justice Roberts appears to have written a sweeping 21st century opinion on the Fourth Amendment: recognizing the profound changes wrought by technology and the resulting need to create new protections for ordinary people. — Elizabeth Joh (@elizabeth_joh) June 22, 2018

The conservative wing of the court, Justices Gorsuch, Alito, Thomas, and Kennedy, were largely frustrated with the fact that in their view, Carpenter had no valid claim to begin with as he did not own the cellphone records in question.

"Cell-site records, like all the examples just discussed, are created, kept, classified, owned, and controlled by cell phone service providers, which aggregate and sell this information to third parties," Justice Anthony Kennedy wrote in his dissent.

Justice Thomas agreed.

"[Carpenter] did not create the records, he does not maintain them, he cannot control them, and he cannot destroy them," he wrote. "Neither the terms of his contracts nor any provision of law makes the records his. The records belong to MetroPCS and Sprint."