The case attracted national attention and gave rise to an intense debate over how much leeway school officials should have in enforcing zero-tolerance policies for drugs and violence. Some parents were outraged by the intrusiveness of the search, while others worried about tying the hands of school officials charged with keeping their children safe.

The case also revealed a gender fault line at the court. In an unusual interview about a pending case, Justice Ruth Bader Ginsburg told USA Today in the spring that judging from their comments at the argument, her colleagues, all men, had failed to appreciate what Ms. Redding had endured.

“They have never been a 13-year-old girl,” Justice Ginsburg said. “It’s a very sensitive age for a girl. I don’t think that my colleagues, some of them, quite understood.”

In the end, Justice Ginsburg’s view of the constitutionality of the search prevailed.

But the decision did not offer particularly clear guidance to school personnel, who were told only to take account of the extent of danger of the contraband in question and whether there is good reason to think it is hidden in an intimate place. So the upshot of the decision in a practical sense may well be to eliminate strip searches in schools.

“A number of communities have decided that strip searches in schools are never reasonable and have banned them no matter what the facts may be,” Justice Souter said, citing a regulation of the New York City Department of Education banning such searches in all circumstances.