WASHINGTON — The Supreme Court announced Friday that it will decide whether it’s legal for police to collect DNA samples from people under arrest, a case that could have nationwide implications on the question of privacy versus public safety.

The justices announced that they will review a Maryland court decision that effectively barred the warrantless collection of genetic material from suspects who have not yet been convicted of a crime, a procedure used around the country in hopes of cracking old cases.

Search photos available for purchase: Photo Store →

Courts have upheld DNA collection from those convicted of a crime. But the federal government and 27 states also have laws that allow the collection of DNA from people arrested but not yet convicted.

Maryland began collecting samples from people arrested for violent crimes in 2009 and authorities took a cheek swab from Alonzo King Jr., who was arrested on assault charges. Police found out the sample matched the DNA of a rapist from a 2003 rape in Salisbury, Md. King was later found guilty in the 2003 attack and sentenced to life in prison.

But King challenged his conviction, saying the pre-conviction collection of his DNA violated his Fourth Amendment protections against unreasonable search and seizures. Maryland’s highest court agreed, with judges saying “King’s expectation of privacy is greater than the state’s purported interest in using his DNA to identify him for purposes of his 10 April 2009 arrest on the assault charges.”

The federal appeals courts have so far sided with the police on this issue, who say the samples contribute to a database that helps law enforcement.

This year, the 9th U.S. Circuit Court of Appeals in San Francisco ruled California law enforcement officials can keep collecting DNA samples from people arrested for felonies because law enforcement’s interest in solving cold cases, identifying suspects and even exonerating the wrongly accused outweighed privacy concerns.