SALT LAKE CITY -- The U.S. Supreme Court sided with the state of Utah on drug search case that has implications for the public on what can and cannot be used against you in court.

In Utah v. Strieff, the nation's top court ruled 5-3 on the Fourth Amendment search case. In 2006, South Salt Lake police got an anonymous tip alleging drugs were sold out of a home. A detective who was watching the home stopped Edward Strieff, Jr. to question him. During that stop, the officer arrested Strieff on an outstanding warrant and found methamphetamine and a drug pipe.

Strieff challenged his arrest, claiming the officer lacked reasonable suspicion. A district court allowed the evidence in and the Utah Court of Appeals upheld that decision, but the Utah Supreme Court reversed it in 2015 and sided with Strieff.

The Utah Attorney General's Office appealed to the U.S. Supreme Court. In its ruling issued Monday, Justice Clarence Thomas gave the majority opinion. He was joined by Justices Kennedy, Roberts, Alito and Breyer.

"In this case, there was no flagrant police misconduct. Therefore, Officer Fackrell’s discovery of a valid, pre-existing, and untainted arrest warrant attenuated the connection between the unconstitutional investigatory stop and the evidence seized incident to a lawful arrest," Justice Thomas wrote in the opinion.

The justice wrote that the warrant is a critical part of the illegal stop.

"The discovery of that warrant broke the causal chain between the unconstitutional stop and the discovery of evidence by compelling Officer Fackrell to arrest Strieff. And, it is especially significant that there is no evidence that Officer Fackrell’s illegal stop reflected flagrantly unlawful police misconduct," Justice Thomas wrote.

Justices Kagan, Sotomayor and Ginsberg dissented.

"Do not be soothed by the opinion’s technical language: This case allows the police to stop you on the street, demand your identification, and check it for outstanding traffic warrants—even if you are doing nothing wrong," Justice Sonia Sotomayor wrote. "If the officer discovers a warrant for a fine you forgot to pay, courts will now excuse his illegal stop and will admit into evidence anything he happens to find by searching you after arresting you on the warrant. Because the Fourth Amendment should prohibit, not permit, such misconduct, I dissent."

In a scathing dissent, Justice Sotomayor accused the Court of giving officers "an array of instruments to probe and examine you."

"We also risk treating members of our communities as second-class citizens. Although many Americans have been stopped for speeding or jaywalking, few may realize how degrading a stop can be when the officer is looking for more," she wrote.

The justice noted that people of color are frequently subjects of "suspicionless stops." She wrote that because Strieff happened to be white shows that anyone's dignity can be violated in this manner.

"By legitimizing the conduct that produces this double consciousness, this case tells everyone, white and black, guilty and innocent, that an officer can verify your legal status at any time. It says that your body is subject to invasion while courts excuse the violation of your rights. It implies that you are not a citizen of a democracy but the subject of a carceral state, just waiting to be cataloged," she wrote.

In their dissents, Justices Elena Kagan and Ruth Bader Ginsberg worried that Strieff could lead to more unconstitutional searches by police.

"But when he is told of today’s decision? Now the officer knows that the stop may well yield admissible evidence: So long as the target is one of the many millions of people in this country with an outstanding arrest warrant, anything the officer finds in a search is fair game for use in a criminal prosecution. The officer’s incentive to violate the Constitution thus increases: From here on, he sees potential advantage in stopping individuals without reasonable suspicion—exactly the temptation the exclusionary rule is supposed to remove," Kagan wrote.

Thomas disagreed in his majority opinion.

"Strieff argues that, because of the prevalence of outstanding arrest warrants in many jurisdictions, police will engage in dragnet searches if the exclusionary rule is not applied. We think that this outcome is unlikely. Such wanton conduct would expose police to civil liability," he wrote.

Strieff declined comment through his attorney, Joan Watt, on Monday. In an interview with FOX 13, she expressed disappointment at the ruling and said it had broad implications for people when they encounter police.

More on FOX 13 News throughout the day...