The cellphone data fits awkwardly into existing Fourth Amendment doctrine, because until recently there has been really nothing like it. It is, as Chief Justice John Roberts wrote in his majority opinion, “detailed, encyclopedic, and effortlessly compiled”—a powerful tool for law enforcement.

Here’s an opinion by Justice Samuel Alito arguing that new technology requires new Fourth Amendment doctrines:

Society’s expectation has been that law enforcement agents and others would not—and indeed, in the main, simply could not—secretly monitor and catalogue every single movement of an individual’s car for a very long period. In this case, for four weeks, law enforcement agents tracked every movement that respondent made in the vehicle he was driving. We need not identify with precision the point at which the tracking of this vehicle became a search, for the line was surely crossed before the 4-week mark.

Alito wrote those words in a 2011 case, United States v. Jones, in which he concurred as the Court held that a GPS tracker attached to a suspect’s car for one month constituted a “search” for which a warrant was required. Friday, however, Alito dissented—arguing that a four-month use of cellphone data was not a search and did not require a warrant. My first reaction (and I suspect that of some others) was, “Who are you and what have you done with Samuel Alito?”

Alito, as we will see, had reasons for his apparent flip; and Carpenter on Friday jumbled the Court’s usual ideological categories. The vote count was 5–4; the opinion was written by Roberts, with the votes of the four moderate liberals—Ruth Bader Ginsburg, Stephen Breyer, Elena Kagan, and Sonia Sotomayor. Justice Anthony Kennedy wrote an angry dissent, as did each of the other three conservatives, Alito and Justices Clarence Thomas and Neil Gorsuch.

The real issue in Carpenter was whether the Court would or should recognize the changed technological universe Americans live in, or would insist on deciding 21st-century issues with 20th-century doctrines. The case jumbled two venerable lines of Fourth Amendment precedent. One, set out in a case called Katz v. United States, asks whether an individual has a “reasonable expectation of privacy” in a given location or activity, whether inside the home or nominally in public. The Katz Court held that there was such an “expectation” in a public phone booth (younger readers see one here). The other line of cases, called the “third-party doctrine,” states that individuals have no “expectation of privacy” in materials—such as bank records or lists of phone numbers they call—that they turn over to businesses instead of keeping themselves.

Obviously the cellphone records (the technical term is “cell-site location information,” or CSLI) are kept by the phone companies; users don’t own them and ordinarily never see them. Their utility to law enforcement is glaringly obvious—phone providers keep them for five years, and police can use them to determine weeks, months, or years of a suspect’s movements.