Arizona school officials violated the constitutional rights of a 13-year-old girl when they strip-searched her on the suspicion she might be hiding ibuprofen in her underwear, the Supreme Court ruled yesterday. The decision put school districts on notice that such searches are “categorically distinct” from other efforts to combat illegal drugs.

In a case that had drawn attention from educators, parents and civil libertarians across the country, the court ruled 8 to 1 that such an intrusive search without the threat of a clear danger to other students violated the Constitution’s protections against unreasonable search or seizure.

Justice David H. Souter, writing perhaps his final opinion for the court, said that in the search of Savana Redding, now a 19-year-old college student, school officials overreacted to vague accusations that Redding was violating school policy by possessing the ibuprofen, equivalent to two tablets of Advil.

What was missing, Souter wrote, “was any indication of danger to the students from the power of the drugs or their quantity, and any reason to suppose that Savana was carrying pills in her underwear.”