The Supreme Court on Tuesday struggled with what one of the justices called its most important criminal procedure case in decades, whether to let police take DNA without a warrant from those arrested in hopes of using it to solve old cases.

Justices seemed conflicted over whether police have a right to take genetic information from people who have only been arrested without getting a judge’s approval first, or if the government’s interest in solving cold cases trumped the immediate privacy rights of those under suspicion of other crimes.

“I think this is perhaps the most important criminal procedure case that this court has heard in decades,” said Justice Samuel Alito, a former prosecutor.

“This is what is at stake: Lots of murders, lots of rapes that can be solved using this new technology that involves a very minimal intrusion on personal privacy,” Alito said later. “Why isn’t this the fingerprinting of the 21st century?

But Chief Justice John Roberts and Justice Elena Kagan questioned how far the government can go if it decides that the police have an interest in people’s DNA to help solve cases, with Roberts noting that it wouldn’t take much for police to add DNA swabs to traffic stops.

“Police officers who give Breathalyzer tests, they can also take a Q-tip or whatever and get a DNA sample, right?” Roberts said.

“It could be any arrestee, no matter how minor the offense,” Kagan said.

Getting DNA swabs from criminals is common. All 50 states and the federal government take cheek swabs from convicted criminals to check against federal and state databanks, with the court’s blessing. But now 28 states and the federal government now also take samples from people who have been merely charged with various crimes.

According to court documents, the FBI’s Combined DNA Index System or CODIS contains more than 10 million criminal profiles and 1.1 million profiles of those arrested.

In the case before the court, a 53-year-old woman was raped and robbed but no one was arrested. Almost six years later, Alonzo King was arrested and charged with felony second-degree assault. Taking advantage of a Maryland law that allowed warrantless DNA tests following some felony arrests, police took a cheek swab of King’s DNA, which matched a sample from the 2003 Salisbury rape. King was convicted of rape and sentenced to life in prison.

King eventually pleaded guilty to a lesser charge of misdemeanor assault from his arrest, a crime for which Maryland cannot take warrantless DNA samples. The state courts said it violated King’s rights for the state to take his DNA based on an arrest alone.

The state Court of Appeals said King had “a sufficiently weighty and reasonable expectation of privacy against warrantless, suspicionless searches.”

The Supreme Court is reviewing that decision and will make a decision later this year.

The decision may not fall along the court’s ideological lines — for example, conservative Justice Antonin Scalia seemed at times to concern himself about the program’s reach, and the usually liberal-voting Justice Stephen Breyer seemed to think that DNA cheek swabs were no more intrusive than fingerprinting.

King’s lawyer, Kannon K. Shanmugam, told the justices there’s “legitimate expectation of privacy” in the contents of an individual’s DNA.

But prosecutors argued that suspects have less expectations of privacy than people not in police custody. In addition to solving cold cases, prosecutors argued that DNA testing is needed to help identify the person in custody, just like fingerprinting.

With arrested individuals, the government has a compelling interest in “knowing who that person is, which includes knowing what the person has done. And DNA does that in a far more powerful way than fingerprints have done,” Justice Department lawyer Michael R. Dreeben said.

If that comparison can be made, “I think that you would have a quite good case,” Kagan said.

But Maryland Chief Deputy Attorney General Katherine Winfree said it now takes 11-17 days to get results from a DNA swab, making it useless for instant identification. She argued that technology will soon go into use give the police the ability to get results back from DNA swabs within minutes.

But “can I base a decision today on what you say is going to happen in two years?” Roberts said.

“You can’t demonstrate that the purpose is immediate identification of the people coming into custody. You just can’t demonstrate that now,” Scalia said to Winfree. “Maybe you can in two years. The purpose now is the purpose you began your presentation with, to catch the bad guys, which is a good thing. But you know, the Fourth Amendment sometimes stands in the way.”

The case is Maryland v. King, 12-207.