Photo: Paul Chinn / The Chronicle Photo: Mason Trinca / Special To The Chronicle Photo: Mason Trinca / Special To The Chronicle Photo: Paul Chinn, The Chronicle

San Francisco police officials gathered a room of reporters at department headquarters almost a year ago to make a stunning announcement: They had used DNA evidence to identify and jail an alleged serial sexual predator dubbed the “Rideshare Rapist” who terrorized women for years while posing as a driver for a ride-hailing service.

The arrest intensified the focus on rider safety in the emerging app-based industry. Immigration officials seized on the case, pointing out that the suspect, 38-year-old Orlando Vilchez Lazo, was in the country illegally from Peru. Meanwhile, revelations that Vilchez Lazo had worked for Lyft raised questions about the company’s background checks.

But in describing its breakthrough, the Police Department left out a potentially catastrophic flaw in the case.

Investigators identified Vilchez Lazo as a suspect in four violent rapes by pulling him over during a traffic stop on July 7, 2018, and making him blow into an alcohol screening test to obtain DNA from the saliva left behind, his attorney, Deputy Public Defender Sandy Feinland, wrote in a motion filed this week in San Francisco Superior Court.

Feinland contends that police fabricated a reason to pull over his client to get his DNA without a warrant, making the stop and search illegal. Vilchez Lazo had no alcohol in his system, he said.

“After illegally detaining Mr. Vilchez Lazo, police continued to hold him in order to get a sample of his DNA,” Feinland wrote. “Even though Mr. Vilchez Lazo exhibited no signs or symptoms of intoxication, police detained Mr. Vilchez Lazo — for over twenty minutes — pretending to conduct a DUI investigation.”

San Francisco police officials said Tuesday they could not comment on the case and referred questions to the district attorney’s office. The district attorney’s office said it will file a response with the court and declined to comment.

Vilchez Lazo was released after the traffic stop, but police arrested him five days later after his DNA allegedly matched evidence recovered in one of the unsolved cases. Investigators then used the match as probable cause to obtain several search warrants, records show.

Vilchez Lazo has pleaded not guilty in the case and is being held without bail in County Jail on three charges of kidnapping, four counts of rape, two counts of sexual penetration with a foreign object and three counts of kidnapping to commit another crime.

Investigators have said Vilchez Lazo posed as a driver for hire, luring intoxicated women from outside nightclubs in the city’s South of Market neighborhood and raping them at knifepoint. He was working for Lyft at the time, but was not using the platform when he committed the assaults, police said. Lyft said last year that it terminated Vilchez Lazo when the allegations came to light and has since reinforced its background checks.

To search a person and collect their DNA, police usually make a case to a judge and obtain a warrant before taking a blood sample or a swab of the cheek. In those cases, investigators must explain why they have probable cause to believe a crime was committed.

If a judge agrees with Feinland, who is seeking to suppress the DNA evidence collected at the traffic stop, it could undo the prosecution’s case against Vilchez Lazo. The argument centers around the legal doctrine known as fruit of the poisonous tree, in which all evidence obtained as the result of an illegal search must be suppressed.

“In this case, to achieve their long-desired goal of catching a suspected sexual predator, police turned on their sirens and threw the Constitution out the window,” Feinland wrote.

The unusual case highlights some of the complex legal issues around DNA, police searches and expectations of privacy as technology flourishes. Civil rights attorneys have for years fought the growing scope of law enforcement’s ability to use DNA in California — and have often lost.

“This is an attempt to use this technology in ways that on one hand can be quite productive if they located the right person, but on the other, may be quite intrusive, and is the type of investigation that perhaps should require a warrant,” said Michael Risher, an East Bay civil rights attorney and former lawyer with the ACLU who specializes in DNA issues.

Risher pointed to two California Court of Appeal rulings that have been favorable to law enforcement officers who obtained DNA from criminal suspects without warrants. The court in 2010 found that people don’t have Fourth Amendment rights against illegal searches and seizures for items they discard, like cigarette butts or tissues.

And in a 2008 case that parallels the Vilchez Lazo investigation, police in Southern California stopped a man for traffic violations and found his eyes were bloodshot and watery. After performing a breath test, they let him go, but police saved the mouthpiece from the test and linked him to a string of residential burglaries through his DNA. In 2011, the appeals court ruled that the defendant did not have a right to privacy for the saliva he deposited on the mouthpiece.

The case against Vilchez Lazo may turn on whether a judge finds that police had grounds to pull him over, or whether they were simply using the stop as an excuse to get his DNA without probable cause, one legal expert said.

“As long as there was a legitimate motive, police can pull him over, but they can’t just pull him over because they want his DNA,” said Laurie Levenson, a former federal prosecutor who teaches criminal law at Loyola Law School in Los Angeles. “But it’s a very low threshold to pull someone over for a sobriety stop.”

Prosecutors may challenge Feinland’s motion using a variety of arguments, Levenson said, including the doctrine known as inevitable discovery, in which evidence considered inadmissible may be used at trial if attorneys can prove that the police investigation would have led to the evidence anyway.

But before getting Vilchez Lazo’s DNA, police didn’t have a suspect, and it’s unclear whether they had evidence that may have led them to him. Feinland argued that police detained his client as part of a “fishing expedition” while conducting surveillance around nightclubs during their pursuit of the serial rapist.

“Just say, ‘(He was) slightly swerving,’” one officer was recorded saying on his body-worn camera, Feinland wrote.

After the officers conducted one test that showed Vilchez Lazo had a 0.0% blood alcohol content, they administered a second test “and ordered Mr. Vilchez Lazo to ‘spit’ on the device to ensure they had enough DNA for a reference sample,” Feinland wrote.

The officers let him go and sent the DNA samples to the city crime lab. Four days later, on July 11, 2018, technicians found that the sample matched DNA that had been recovered from one of the rapes, authorities said.

Investigators then began writing a series of warrants to search Vilchez Lazo’s home, car and electronic devices, including more than 15 cell phones, Feinland wrote. Police also got a warrant to secure another sample of his DNA. The evidence prompted prosecutors to charge Vilchez Lazo in the four separate attacks.

Shortly after police announced an arrest, federal officials used the case to criticize San Francisco’s sanctuary policy that restricts cooperation between local law enforcement and immigration agents.

But Vilchez Lazo had no previous contact with law enforcement in the U.S., so the city’s sanctuary policy would not have affected him. Immigration and Customs Enforcement officials did not explain why they linked the case to San Francisco’s sanctuary law.

A judge is scheduled to hear Feinland’s motion, along with a rebuttal from prosecutors, on Monday.

Evan Sernoffsky is a San Francisco Chronicle staff writer. Email: esernoffsky@sfchronicle.com Twitter: @EvanSernoffsky