Anyone arrested for a felony in California can now expect both an unpleasant trip to jail and a demand for a sample of their precious DNA.

To the dismay of civil liberties advocates, a federal appeals court on Thursday unanimously upheld California’s law allowing collection of DNA samples from anyone arrested on a felony, citing a U.S. Supreme Court ruling last year backing a similar Maryland law. A special 11-judge 9th U.S. Circuit Court of Appeals panel rejected the American Civil Liberties Union’s argument that California’s law is broader than Maryland’s and threatens privacy rights more.

California’s controversial 5-year-old law permits collection of DNA from people at the point of felony arrest without review by a judge and even if criminal charges are never pressed, raising concerns that it intrudes on privacy rights for those arrestees who may never appear in a courtroom. Maryland’s law permits collection only from those charged with a serious felony and after a judge finds probable cause they’ve committed a crime.

But the 9th Circuit disagreed that California’s law can be distinguished from Maryland’s, effectively concluding that the Supreme Court ruling undercuts the ACLU’s legal arguments. The 9th Circuit suggested that civil liberties advocates could return to the lower courts and raise narrower claims, but for now left California’s DNA collection law intact.

ACLU lawyers indicated they plan to take up the 9th Circuit’s invitation and will ask a federal judge to hear arguments on whether particular groups of people arrested for felonies should be insulated against the DNA collection law.

The ACLU’s 2009 lawsuit was brought on behalf of plaintiffs such as an Oakland woman, Elizabeth Haskell, who was arrested during a San Francisco rally against the Iraq War. Haskell was required to submit to DNA testing at the time of her arrest but was never charged with a crime.

“We need to find where the line is,” said Michael Risher, an ACLU attorney. “We’d certainly be focused on people like our named plaintiffs who were never charged with an offense. That to us is a core group of people who clearly do not fall under the (Supreme Court’s) ruling.”

The appeals court backed California Attorney General Kamala Harris’ position that the differences between the California and Maryland laws are not “constitutionally significant.” The Obama administration sided with California in the appeal, citing the national importance of DNA collection laws that 28 states have enacted.

As of late last year, California’s DNA collection had resulted in more than 20,000 hits in criminal cases across the state, according to state Department of Justice figures.

Legal experts had predicted civil liberties lawyers would have an uphill fight in the 9th Circuit because of the divided Supreme Court ruling, which likened collection of DNA samples to fingerprinting suspects booked into police custody.

California’s law permits people arrested for a felony who are later cleared of charges to apply to have their DNA sample expunged from the state’s database.

Howard Mintz covers legal affairs. Contact him at 408-286-0236 or follow him at Twitter.com/hmintz