"Taking and analyzing a cheek swab of the arrestee DNA is, like fingerprinting and photographing, a legitimate police booking procedure that is reasonable under the Fourth Amendment," Justice Anthony Kennedy wrote for the court's five-justice majority, referring to the US Constitution.
But the four dissenting justices said that the court was allowing a major change in police powers.
"Make no mistake about it: because of today's decision, your DNA can be taken and entered into a national database if you are ever arrested, rightly or wrongly, and for whatever reason," conservative Justice Antonin Scalia said in a sharp dissent which he read aloud in the courtroom.
But the high court's decision reverses that ruling, which will likely allow states to resume and expand the programs. Kennedy wrote the decision, and was joined by Chief Justice John Roberts and Justices Samuel Alito, Clarence Thomas and Stephen Breyer. Scalia was joined in his dissent by Justices Ruth Bader Ginsburg, Sonia Sotomayor and Elena Kagan.