The “Golden State Killer” lost his mind — and morals — after witnessing his sister being raped at a young age, spurring his decade-long bloody rampage, relatives suggested in a new report.

After evading authorities for nearly 40 years, retired cop Joseph James DeAngelo, 72, was identified last month as the serial rapist and killer who terrorized California between 1974 and 1986.

Decades earlier, when he was about 9 or 10, he watched as two airmen raped his 7-year-old sister, Constance, in an Air Force base warehouse in Germany, the woman’s son told BuzzFeed News.

“That’s pretty crazy for a kid to see his sister violated,” said Jesse Ryland, 35, who learned of the incident from his mother just before she died of cancer last year. “Maybe that was the start of Joe going wacko.”

The “Golden State Killer,” also known as the “East Area Rapist,” committed over 50 rapes during his monstrous spree, breaking into homes and attacking women who were home alone, home with their kids or with their partners or parents — gripping California in a state of terror.

It’s possible that DeAngelo became obsessed with rape after his sister’s sexual assault, said Ann Wolbert Burgess, a psychiatric nursing professor at Boston College who studied the profiles of 36 convicted serial killers in the late 1970s and early 1980s with FBI agents in the Behavioral Science Unit.

“Of course that would be significant and could have set the nucleus of the fantasy,” she told the website. “What probably happened was that it was something that he kept on his mind.”

But Paul Holes, a retired investigator who came up with the DNA family-tracing technique that helped nab DeAngelo, believes the suspected killer was driven by the breakup of his engagement to a woman in the 1960s.

Holes, a retired cold case investigator for the Contra Costa County District Attorney’s Office who spent 24 years chasing the killer, now wonders whether Constance’s sexual assault could have fueled DeAngelo’s alleged rape and murder spree.

“As more is found out about him and his childhood, we’ll get a better sense on how witnessing something like that would have contributed to him developing into the guy he was,” Holes told Buzzfeed News.

DeAngelo’s dad, a US airman stationed in Germany, repeatedly beat his wife, Kathleen, who herself abused at least one of their three children, Ryland said.

According to Ryland, his mother and uncle were instructed by their parents never to mention what happened in the airbase warehouse in Germany.

Constance’s husband, Kenneth Ryland Sr., said his wife never told him she was raped as a child in their 26 years of marriage and that he only heard about the incident recently from their son and one of their daughters.

“I’m just trying to get my mind wrapped around it,” he said.

Growing up, Jesse Ryland never suspected his uncle was violent or could be responsible for the 12 murders he is accused of committing.

But when he heard his uncle had been identified as the “Golden State Killer,” everything made sense, he said.

“Joe was young and saw my mom get raped. It instantly clicked in my head,” he said.

Although Ryland said his mother and DeAngelo were close, he didn’t see his uncle very often growing up and hasn’t seen him in about 10 years.

“I almost wish I could go and see him and ask Joe about it if he remembers,” Ryland said. But “It’s probably not a good time for that,” he admitted.