The testing does not have to be preceded by a finding that drugs are a problem at a particular school or among a particular group of students.
The 5-4 decision came out of a case that challenged such a drug testing policy at an Oklahoma school. However, its provisions will apply nationwide and are expected to encourage school districts across the country to conduct similar programs.
A Supreme Court majority ruled in 1995's Vernonia vs. Acton that student athletes could be randomly drug tested. In Vernonia, the majority said athletes had already given up their expectation of privacy by participating in sports and changing in locker rooms.
But Thursday's decision was the first time the high court had approved random drug testing for such a large percentage of the student body.
Thursday's majority did not form along strictly ideological lines.
Justice Stephen Breyer deserted his fellow liberals to form the narrow majority with more conservative justices. Justice Sandra Day O'Connor, a moderate conservative and normally a key swing vote, joined the rest of the liberals in dissent.
Writing for the majority, Justice Clarence Thomas said the random testing policy "reasonably serves the school district's important interest in detecting and preventing drug use among its students," and is therefore constitutional.
The Fourth Amendment bans "unreasonable searches and seizures." In the case of school children, Thomas said, it is "reasonable" to balance privacy needs against the compelling government interest in stopping drug use.
Thomas conceded that non-athletes have a greater expectation of privacy than student athletes. But he said that fact was not essential in Vernonia, and was not the controlling factor in the Oklahoma case.
Breyer joined Thomas's opinion and wrote separately.
"I do not know whether the school's drug testing program will work," Breyer concluded. "But in my view, the Constitution does not prohibit the effort."
O'Connor, who dissented in Vernonia, said she did so again for the same reasons -- that the government's compelling interest doesn't override an individual's privacy rights.
Justice Ruth Bader Ginsburg wrote the main dissent, and was joined by O'Connor and two fellow liberals.
"Nationwide, students who participate in extracurricular activities are significantly less likely to develop substance abuse problems than are their less involved peers," Ginsburg said.
The Oklahoma school's policy "invades the privacy of students who need deterrence least, and risks steering students at greater risk for substance abuse away from extracurricular involvement that potentially may palliate drug problems," she said.
The Oklahoma institution at the center of the case, Tecumseh High School, offers a broad variety of extracurricular activities -- including band, choir, color guard, Future Farmers of America and Future Homemakers of America.
The random drug testing included students in those activities, as well as students in athletics, cheerleading and pompon squad.
The school is in a rural area about 40 miles from Oklahoma City.
The local board's petition to the Supreme Court said there was a "long-standing problem of drug use among students" in Tecumseh's school district.
In response, school officials have used "surveillance cameras, drug education, drug dogs and increased security personnel," but drug use "has not been eliminated."
The school board first discussed random drug testing of students during the 1997-1998 school year. The program actually began in September 1998.
Not everyone was happy with the plan.
Three students and their parents filed suit in federal court against the random testing in 1999. The students didn't include athletic teams in their challenge since the Supreme Court had already approved random testing of school athletes in 1995.
Relying on the Supreme Court's 1995 Vernonia precedent, a federal judge ruled for the school district. Then a federal appeals court panel, relying on the same Supreme Court decision, reversed the judge 2-1.
The appeals court said 1995's Vernonia required the courts to balance competing interests.
The school district had a compelling interest in stopping the student use of drugs. The students had a compelling interest in maintaining their privacy. Moreover, the Fourth Amendment bans "unreasonable" searches.
The appeals court said the school district just hadn't done its homework.
"Any district seeking to impose a random suspicionless drug testing policy as a condition to participation in a school activity must demonstrate there is some identifiable drug abuse problem among a sufficient number of those subject to the testing, (to) such (an extent) that testing that group of students will actually redress its drug problem," the appeals court majority said.
The school district then asked the Supreme Court for review, saying the appeals court ruling violated high court precedent, including Vernonia, and "the issue ... is of major importance not only to (Tecumseh) but to all public schools in the nation which are responsible for the safety of the students under their supervision on a daily basis, and must address drug use which threatens their safety."
The Supreme Court heard argument in the case March 19. Thursday's decision reverses the lower court and allows the random drug testing to continue.
(01-332, Bd of Ed, Pottawatomie County vs. Earls, Lindsay et al)
Swim Week Miami Beach 2014 [PHOTOS]