SACRAMENTO — To solve a decades-old serial rape and murder case that had gone cold, investigators used DNA gathered at a crime scene and created a fake profile and pseudonym on a genealogy website several months ago, according to law enforcement officials.

An investigator with the Contra Costa County district attorney’s office and an F.B.I. lawyer worked together for several months, submitting the genetic profile of a DNA sample recovered from a 1980 murder to a genealogy website, which then delivered several matches of individuals who were distant relatives of the suspect. From there, in consultation with several genealogists, they were led to the doorstep of the man whom they believed carried out a spree of rapes and murders across California in the 1970s and 1980s.

The investigator, Paul Holes, had worked the case for more than two decades — chasing thousands of suspects and endless leads — before he looked to the nexus of genealogy and technology as a possible route to the killer.

Not everyone from the various California law enforcement agencies involved in a task force hunting the killer were sold on the idea — some raised privacy and legal concerns — but Steve Kramer, a lawyer in the Los Angeles field office of the F.B.I., agreed it had merit and was legal, Mr. Holes said in an interview.