Sacramento authorities confirmed Thursday that they used DNA profiles from ancestry websites to help them catch the Golden State Killer, also known as the East Area Rapist and the Original Night Stalker (EARONS).

The suspect, 72-year-old Joseph James DeAngelo Jr., was arrested earlier this week in connection with the famously unsolved serial rape and murder case, which included as many as 50 confirmed rapes and 12 murders over a 10-county area in California between 1974 and 1986. DeAngelo worked as a police officer for a six-year period during the most active part of the investigation.

A Wednesday press conference announcing the arrest focused heavily on DNA evidence linking DeAngelo to the crimes, but authorities didn’t specify how that DNA was obtained. Thursday, the Sacramento district attorney’s office confirmed to the Sacramento Bee that authorities had submitted EARONS’s DNA, collected from a 1978 crime scene, to online websites like Ancestry.com and 23andme.com. These websites allow individuals to look up information about their genetic background by matching their DNA against publicly available DNA profiles. Lead investigator Paul Holes said his team used the website GEDmatch, which creates profiles based on voluntarily shared, publicly available genetic info.

Investigators searched family trees generated through the public profiles, looking for plausible leads. After “a long period of time,” a break in the case finally came together incredibly swiftly — beginning last Thursday, April 19, when investigators pinpointed DeAngelo as a plausible suspect. They then placed him under surveillance, collected a sample of his discarded DNA, and had a match by the following day, the evening of April 20. They then collected a second sample, confirmed that match by Monday night, and arrested DeAngelo the next day, the afternoon of April 24.

“The answer was and always was going to be in the DNA,” Sacramento DA Anne Marie Schubert stated at the press conference.

Familial DNA investigations are increasingly common, and increasingly controversial

This isn’t the first time DNA profiles from ancestry websites have been used to crack a longstanding unsolved mystery. In 2016, after years of mystery surrounding the identity thief known as Lori Erica Ruff, her real name was finally revealed thanks in part to the submission of a relative’s DNA profile to ancestry websites. A similar case was solved just last month, when authorities used genealogical profiling to narrow down family trees and ultimately identify the Jane Doe known as “Buckskin Girl.”

But this manner of DNA collection, and its use in criminal cases, is also controversial. Matching DNA markers against large databases can often lead to misleading results because many specific markers can be shared by a large swath of the population. Also at issue are concerns of privacy, informed consent — especially given how confusing the terms of use are on many DNA collection websites — and the long-term ramifications of having a DNA profile on file with law enforcement, even if you submit voluntarily to being swabbed.

(Currently, a 2008 law known as the Genetic Information Nondiscrimination Act, or GINA, prevents a scenario in which insurance companies or other private businesses could deny service or otherwise discriminate against you on the basis of your DNA profile.)

Local law enforcement who spoke at Wednesday’s press conference seemed to indicate that they would prefer not to have to use third-party familial DNA testing websites like the one that led them to DeAngelo. Instead, they focused on the need to expand California’s existing DNA database.

California’s existing DNA collection law, Proposition 69, was passed in 2004 but remains controversial because it allows for “DNA testing at the earliest stages of criminal proceedings for felony offenses,” from people who are arrested before they’re actually convicted. Despite concerns, the law was upheld in court earlier this month. Now, a ballot initiative is currently underway to expand California’s state database to allow for the mandatory collection of DNA from “persons convicted of specified misdemeanors” as well.

It’s worth noting that DeAngelo had only one minor criminal offense on his record — the 1979 shoplifting incident that led to his getting fired from the Auburn police force. So in this instance, no amount of DNA database expansion would have led to his apprehension.

In response to the news that law enforcement used GEDmatch to find DeAngelo, the website released a statement Friday cautioning users to be aware that when they consent to release their DNA to build profiles, they can be used for this kind of dragnet.

“We understand that the GEDmatch database was used to help identify the Golden State Killer,” Curtis Rogers, a spokesperson for the site, said, according to Mercury News. “Although we were not approached by law enforcement or anyone else about this case or about the DNA, it has always been GEDmatch’s policy to inform users that the database could be used for other uses, as set forth in the Site Policy. … While the database was created for genealogical research, it is important that GEDmatch participants understand the possible uses of their DNA, including identification of relatives that have committed crimes or were victims of crimes.”

A version of this statement provided to the New York Times further adds, “If you are concerned about non-geneatological uses of your DNA, you should not upload your DNA to the database and/or you should remove DNA that has already been uploaded.”

But while familial DNA matching is a loaded prospect, its popularity is growing. Another California serial killer, the Grim Sleeper, was apprehended using familial DNA matching in 2010, and the technique seems to be becoming increasingly popular among law enforcement.

The result seems to be a trade-off between privacy and justice that many are willing to make.

“This is such an obvious way to solve a crime when you have a string of rapes or murders,” Greg Hampikian, director of the Idaho Innocence Project, told Gizmodo. “You have to try.”