SACRAMENTO — The Golden State Killer repeatedly called out “I hate you, Bonnie” during one of his terrifying sexual assaults — and that critical clue ultimately helped lead investigators to Joseph DeAngelo, a man with a Bonnie in his past, as well as provide a possible motive for his horrific killing and raping spree, an investigator said Tuesday.

DeAngelo, the 72-year-old retired warehouse worker authorities believe is the killer, once was engaged to a woman named Bonnie.

“Most certainly if he’s making the statement, ‘I hate you, Bonnie,’ while he’s attacking another female, he is what we call an anger retaliatory rapist,” directing his anger at someone else, said Paul Holes, a retired Contra Costa County investigator who has been intimately involved with the investigation for decades. “I do believe that’s what happened here. I don’t know what made him that way, but you’ve got to think Bonnie dumped him, he’s not happy about that, he still had feelings for her, who knows? But something along those lines must have happened.”

DeAngelo was arrested Tuesday afternoon at his home in the Sacramento suburb of Citrus Heights, suspected of raping more than 45 women in the late 1970s and 1980s from Sacramento to the Bay Area to Orange County and killing 12 people, including couples at home in bed. DeAngelo was engaged to Bonnie in May 1970, according to a clip from an Auburn newspaper announcing the engagement. They never married.

On Thursday, investigators also revealed details of how — more than 40 years after the suspect known both as the Golden State Killer and East Area Rapist terrorized much of California — they closed in on DeAngelo in the first place, before they made the Bonnie connection. Looking to match DNA from an old crime scene and finding none in criminal databases, they accessed a genealogical database that people use to learn more about their ancestry by submitting saliva and other DNA samples. On the website GEDmatch.com they found a similar DNA profile that turned out to be a distant relative of DeAngelo’s. Then they followed the family tree that ultimately led them to their suspect. And then they learned about Bonnie.

To think that the breakup of a young relationship could have so enraged a man to project that anger on scores of victims is a shocking theory.

But Holes is convinced it is part of the portrait of DeAngelo, who went on to marry another woman, Sharon Huddle, in 1973. Although the couple have been estranged since at least 1997, they were living together during the height of his crime spree that terrorized communities across the state.

One of Huddle’s neighbor’s said Thursday that when DeAngelo would come to visit their three daughters over the years, the two had a “toxic” relationship and engaged in “epic shouting battles” on the quiet neighborhood street.

As of Wednesday afternoon, police had not been able to contact his former fiancee Bonnie, according to Holes. Messages from the Bay Area News Group left on the woman’s phone and at what is believed to be her Sacramento home were not answered Thursday, so questions about her relationship with DeAngelo and how it ended remain unclear. They both had been students at Sierra College.

Even though he retired at the end of March, Holes, 50, stayed involved with the case and has been a key investigator since 1994 when he was working as a forensic scientist. He tested the DNA from numerous crime scenes and was able to help link the cases across the state.

“We always thought there was a Bonnie significant in his life, it could be a mother, a wife, a girlfriend, a childhood crush,” Holes said. When investigators found out DeAngelo had once been engaged to a Bonnie, it only strengthened the case.

The major break, however, was technology. Using a DNA sample from a long-ago crime scene, they found a similar match after combing through genetic information on an online genealogical database. It turned out to be one of DeAngelo’s relatives. While the match didn’t fit what investigators also knew about their killer, Holes said, it “dropped down into the right circle of people.”

They followed the family tree to find a man between 5-foot-8 and 5-foot-10 who lived in the areas at the time of the crimes.

Last week, investigators followed DeAngelo for days until he discarded something with his DNA on it — they wouldn’t say what. By Friday, they had a match, but it was “weak,” Holes said. By Monday morning, he said, they were able to grab a second item he discarded, and by Monday afternoon the crime lab had a perfect match. DeAngelo was arrested Tuesday afternoon as he left his home, where he had lived on and off for years since 1979 undetected.

Holes said that the investigation took so long was “humbling” but that the suspect had purposefully tried to misdirect investigators. DeAngelo had worked briefly as a police officer in Exeter and Auburn before being fired for shoplifting. The killer and rapist would tell his victims false information about himself to throw off investigators, telling one that he had been in the Army when in fact he had served in the Navy. He said something about “pigs” to suggest he hated police. And he threatened to kill one victim “like he did in Bakersfield” even though there were no related killings there, Holes said.

The victim who said her attacker yelled out “I hate you, Bonnie” was terrorized the night of July 6, 1978, in Davis.

When a Davis police investigator asked her, “Are you sure he’s saying Bonnie, not saying Mommy?” the victim said something like, “No, I assure you it was Bonnie,” Holes said.

But there is some indication he may have called out “Mommy” to others. In a book written by the late Michelle McNamara and published earlier this year, she wrote that nearly a dozen victims reported that their assailant cried during the attacks. He “sobbed” and stumbled and “seemed lost.” He also “whimpered in a high-pitched voice like a child,” she wrote, and said things like “I’m sorry, Mom. … Mommy, please help me. I don’t want to do this Mommy.”

Holes said he met up with the victim who endured the cries of “I hate you, Bonnie” a few years ago and asked her again: Was it Bonnie or Mommy? This time “she waffled,” he said. But in her interview with Davis police right after the assault — an interview in the police file — she was clear it was Bonnie.

Holes also said that over the course of a life, people can have more than one traumatizing encounter, and that may have been the case with DeAngelo.

“With this particular guy, I believe there’s a significant event that made him angry and stayed inside him,” Holes said. “That anger would manifest itself over and over, whether a Bonnie situation or a couple of situations. Different things are making him upset.”

As traumatizing as the engagement breakup may have been, DeAngelo went on to marry Huddle and father three children, who are now in their late 20s and 30s. The couple have been estranged for years but apparently never divorced. In Roseville on Thursday, where DeAngelo’s wife lived with her children since 1997, a neighbor said that whatever kind of marriage they had, it was ugly.

“He would come by on a regular basis and scream and yell from the driveway and never step inside,” said the neighbor, who didn’t want his name used. “He and Sharon would get in epic shouting battles. It was a very volatile relationship when he came over, and it was not good. It was just very toxic.”

The last time he saw DeAngelo was about a week before the Tuesday arrest. He had come to help his youngest daughter, who lives with her mom, work on her car. The day he was arrested, police cars appeared at Huddle’s house, but the neighbor said she wouldn’t let them in and spent several hours talking to them on the sidewalk. DeAngelo’s eldest daughter and grandson live with him in Citrus Heights.

In the 21 years that Huddle has lived on the block, she apparently never talked to neighbors, certainly not about her marriage or the man now suspected of being one of California’s most notorious murderers.

“No wave, no hello, no nothing,” the neighbor said. “It makes you wonder whether her behavior was because of him.”

DeAngelo has been in the Sacramento County jail since Tuesday and already has been interviewed by police at least once, Holes said. He has not confessed.

“He’s just somebody,” Holes said, “who’s not going to admit this, I don’t think.”