The Supreme Court Justices of the United States posed for their official "family" group photo and then allowed members of the media to take photos afterward on September 29, 2009, at the Supreme Court in Washington. The justices are John G. Roberts (Chief Justice), John Paul Stevens, Antonin Scalia, Anthony Kennedy, Clarence Thomas, Ruth Bader Ginsburg, Stephen Breyer, Samuel Alito, Sonia Sotomayor. UPI/Gary Fabiano/Pool | License Photo

WASHINGTON, Dec. 15 (UPI) -- The U.S. Supreme Court ruled Monday in the Heien v. North Carolina case that police who pull someone over for something that is not illegal are not violating the constitution.

The ruling was 8-1, with Justice Sonia Sotomayor as the only one opposed.

The case concerns Nicholas Heien, who was driving in North Carolina and was mistakenly pulled over by a police officer. The officer pulled Heien over because of a broken tail light, but having one tail light broken is not against North Carolina law.

The officer found a bag of cocaine after searching the car.

Chief Justice Roberts proclaimed the concept "ignorance of the law is no excuse" does not apply to this case, and the officer acted reasonably. The court found the traffic stop and search did not violate the Fourth Amendment, which prevents "unreasonable searches and seizures."

"To be reasonable is not to be perfect, and so the Fourth Amendment allows for some mistakes on the part of government officials," Roberts wrote.

Sotomayor claims traffic stops are "annoying, frightening and perhaps humiliating," and that allowing police to stop people who haven't broken the law will further the public's distrust of police officers.