The American Civil Liberties Union has sued to stop Los Angeles school officials from randomly searching students for weapons.
Students in one class per day are searched at random in every middle school and high school in the Los Angeles school district by security guards who use metal detectors, pat the students down, and inspect their backpacks.
The suit says female students are also often searched by male guards, a violation of the district's policy.
No weapons have been found in eight years of random searches, officials say. However, they seized 43 guns and knives last year and 151the year before, all found by other means - most were hidden in schoolyards, and in at least one case a gun was brought to class by a teacher.
The searches were instituted after two fatal shootings in Los Angeles schools in 1993. "They have been shown to be a good deterrent against weapons on our campuses," said Superintendent Roy Romer, who is named as a defendant in the lawsuit.
He and other school officials said the searches ensure a safe environment for law-abiding students.
But the ACLU says the random checks are a violation of constitutional protections against unwarranted searches.
"Our society is moving toward treating every youth as a criminal suspect," said Ramona Ripston, executive director of the ACLU of Southern California.
"Searches without reasonable suspicion are just one component in this trend, a trend that makes the false promise of providing safety in exchange for surrendering civil rights. The safety pay-off never materialises, but in the meantime, students' rights do get taken away."
It's not the first legal conflict over student searches.
The California Supreme Court in 1985 ruled that school officials cannot search a student unless they have a reasonable suspicion that the law has been broken.
But a state appeals court in 1998 allowed the use of metal detectors to search students. Targeting truants or students with criminal records is forbidden.
About one-third of all California schools use metal detectors to search students entering schools or attending extra-curricular events such as athletic meetings and dances.
Eight students from a high school near the impoverished Watts section of Los Angeles are named as plaintiffs in the suit."I feel like they're treating me like a criminal. It feels awful," said one, Toi Benford, 15.
"Most of the kids are not involved in any criminal activity. The teachers misjudge people by looks or by actions."
Other students said they had been humiliated by being searched in front of their classmates. They said the searches are ineffective as anyone determined to bring a weapon into school could toss it over a fence, or smuggle it past security guards.
At least one teacher who refused to allow the searches in her classroom has been fired.