The Supreme Court says police generally need a search warrant if they want to track criminal suspects' movements by collecting information about where they've used their cellphones.

The justices' 5-4 decision Friday is a victory for privacy in the digital age. Police collection of cellphone tower information has become an important tool in criminal investigations.

The outcome marks a big change in how police can obtain phone records. Authorities can go to the phone company and obtain information about the numbers dialed from a home telephone without presenting a warrant.

Chief Justice John Roberts wrote the majority opinion, joined by the court's four liberals.

Get Breaking News Delivered to Your Inbox

Roberts said the court's decision is limited to cellphone tracking information and does not affect other business records, including those held by banks.

He also wrote that police still can respond to an emergency and obtain records without a warrant.

Justices Anthony Kennedy, Samuel Alito, Clarence Thomas and Neil Gorsuch dissented. Kennedy wrote that the court's "new and uncharted course will inhibit law enforcement" and "keep defendants and judges guessing for years to come."

The court ruled in the case of Timothy Carpenter, who was sentenced to 116 years in prison for his role in a string of robberies of Radio Shack and T-Mobile stores in Michigan and Ohio. Cell tower records that investigators got without a warrant bolstered the case against Carpenter.

Investigators obtained the cell tower records with a court order that requires a lower standard than the "probable cause" needed to obtain a warrant. "Probable cause" requires strong evidence that a person has committed a crime.

The judge at Carpenter's trial refused to suppress the records, finding no warrant was needed, and a federal appeals court agreed. The Trump administration said the lower court decisions should be upheld.

The American Civil Liberties Union (ACLU), representing Carpenter, said a warrant would provide protection against unjustified government snooping.

The administration relied in part on a 1979 Supreme Court decision that treated phone records differently than the conversation in a phone call, for which a warrant generally is required.

In a case involving a single home telephone, the court said then that people had no expectation of privacy in the records of calls made and kept by the phone company.

That case came to the court before the digital age, and the law on which prosecutors relied to obtain an order for Carpenter's records dates from 1986, when few people had cellphones.

The Supreme Court in recent years has acknowledged technology's effects on privacy. In 2014, the court held unanimously that police must generally get a warrant to search the cellphones of people they arrest. Other items people carry with them may be looked at without a warrant, after an arrest.