An elderly Oregon man in a nursing home was nearly fingered as the Golden State Killer last year after investigators assigned to the sensational cold case tracked him down through a DNA genealogy website, it was reported Saturday.

Those same investigators this week named an ex-cop as the killer after conducting a similar genetic search using commercially-available DNA websites, but without disclosing the misidentification, the Associated Press reported.

In March 2017, an Oregon City police officer, working with the California investigators, obtained a court order directing the nursing home resident, a 73-year-old man, to provide a DNA sample.

The AP reported that the court documents say detectives used a genetic profile based off DNA from crime scenes linked to the serial killer and compared it to information on a free online genealogical site.

Investigators targeted the Oregon man after finding that he shared a rare genetic marker with the killer, AP reported.

'GOLDEN STATE KILLER' SUSPECT MAKES FIRST COURT APPEARANCE IN SACRAMENTO

The Oregon City man is in extremely poor health in a rehabilitation facility and was unable to answer questions Friday, according to the AP.

His daughter said his family was not aware that authorities took a DNA sample from him while he was lying in bed at the rehabilitation center until she was contacted by the FBI in April 2017 and asked to help expand the family's genetic tree in the search for suspects.

The woman, an amateur genealogist, cooperated, but ultimately investigators determined none of her relatives were viable suspects, she said. The AP reported that woman asked that she not be identified because she did not want the family's name publicly linked to the case.

"I don't like that they thought that my dad was the bad guy, but the truth is they were able to rule out people in my dad's (family) tree," she said. "They didn't have to look at those people anymore."

GOLDEN STATE KILLER SUSPECT'S ARREST RAISING PRIVACY CONCERNS DUE TO USE OF GENEALOGY DNA TESTING SITE

Former cop Joseph James DeAngelo, 72, appeared in court Friday after authorities arrested him at his home near Sacramento this week and said he was the long sought serial killer.

The suspect is believed to have committed 12 murders and more than 45 rapes across California dating to the late 1970s.

DeAngelo, wearing orange jail scrubs, looked dazed and answered in a faint voice to acknowledge his lawyer was a public defender.

The Associated Press contributed to this report.