SAN FRANCISCO — Accusing the government of violating constitutional privacy rights, a trio of civil liberties groups is suing the state Department of Justice over its practice of collecting and retaining the DNA profiles of people who were arrested for alleged felonies but never convicted.

California police agencies have been collecting DNA profiles at the time of a felony arrest since 2009. But recent advances in DNA analysis technology — where results come back in a matter of hours rather than weeks — and the passage of a related Congressional bill last year have significantly raised the stakes on the issue.

The Electronic Frontier Foundation and former ACLU staff attorney Michael Risher filed the lawsuit Monday in San Francisco Superior Court on behalf of the Equal Justice Society as well as the Center for Genetics and Society and one of its consultants, Pete Shanks.

It comes in the wake of a state Supreme Court ruling earlier this year upholding the compulsory collection of DNA in felony arrests. Consequently, privacy and civil-rights advocates set their sights on purging the DNA entries of people who were later acquitted or otherwise exonerated, arguing their rights against unlawful search and seizure were being violated.

“One-third of people arrested for felonies in California are never convicted. The government has no legitimate interest in retaining DNA samples and profiles from people who have no felony convictions, and it’s unconstitutional for the state to hold on to such sensitive material without any finding of guilt,” Marcy Darnovsky, executive director at the Center for Genetics and Society, said in a statement.

The office of California Attorney General Xavier Becerra did not immediately respond to a request for comment. But the lawsuit is sure to be met with pushback from law-enforcement groups and the purveyors of what is known as Rapid DNA technology, which includes Pleasanton-based IntegenX.

Rapid DNA, which has reduced the time for producing a profile from genetic material to as little as 90 minutes, has become increasingly prominent. Most recently, it has been used to accelerate identification of victims of the historically destructive Camp Fire in Butte County and to help solve a string of famous cold-case murders in the state and across the country over the past year.

As the technology spread, privacy watchdogs and civil-rights groups have been wary of its combination with the national DNA profile database, maintained by the FBI, that contains upwards of 13 million criminal suspects, not all of them convicted of a crime.

The Rapid DNA Act of 2017, passed with a bipartisan vote in Congress last year, allows law-enforcement agencies to perform real-time DNA testing at the time of an arrest at their own booking stations, comparing samples to profiles in the FBI’s Combined DNA Index System (CODIS). While some of that might already be happening, the FBI has set a timetable for 2019 to test a more robust integration.

Critics say such expansion increases the likelihood of people arrested being treated, in the eyes of law enforcement, automatically as felons and being denied due process. They cite lab mix-ups and sample contamination as examples where a legally innocent person’s inclusion in the DNA database could wrongly implicate them in a crime, with pronounced effects on people of color given their disproportionate representation in the criminal-justice system.

“We want the court to recognize that California’s DNA collection and retention practices are unfairly putting already vulnerable poor communities and people of color at even greater risk of racial profiling and law enforcement abuse,” Lisa Holder, interim legal director at the Equal Justice Society, said in a statement.

Risher told this news organization last year that police still could collect DNA from suspects, just not automatically. Investigators, he said, should use the same information that leads to an arrest to apply for a warrant to get a DNA sample.

In upholding the compulsory collection of DNA for felony arrests, the state Supreme Court likened it to other standard police methods such as taking a suspect’s photograph and fingerprints. The court majority also noted legally innocent people can expunge themselves from the database.

But in the Monday lawsuit, the plaintiffs asserted the process for purging oneself from the database is complicated, poorly publicized and unreasonably difficult to navigate. The plaintiffs estimated that 750,000 DNA profiles collected by California police agencies in the past decade were eligible to be expunged because the people were either exonerated or acquitted, but only 1,510 made such requests, and of those, 1,282 were approved. That amounts to a 0.1 percent removal rate.

“The burden should be on the state to delete the DNA after they discovered they have collected DNA they no longer have a legitimate reason for holding. Instead, the state has a very long, complicated expungement process and doesn’t tell people about it,” said Jamie Lee Williams, an EFF staff attorney who co-authored the lawsuit. “I hope the court recognizes that DNA is incredibly sensitive information, and these people are not convicted. Their cases are over.”