(CNN) -- For decades, a masked gunman nicknamed the Golden State Killer roamed through communities in California, raping dozens of women in a campaign of terror that left 12 people dead.
The string of crimes during the mid-1970s and 1980s later stopped, but the elusive killer remained a mystery for years as police searched for clues.
The trail led authorities to Joseph James DeAngelo, 72, who was arrested Tuesday evening in a Sacramento suburb after detectives matched his DNA to evidence from the investigation, police said.
Despite DeAngelo's age, taking him into custody was not without serious risk, said District Attorney Tom Rackauckas of Orange County, where some of the killings occurred.
"He had guns in the house, that sort of thing, so there were dangers involved," he said.
Here's a look at the suspect's background:
A police officer and mechanic
The suspect allegedly killed 12 people and committed at least 50 rapes in 10 counties in California, authorities said. Some of the alleged crimes overlapped with his time as a police officer in Auburn, California, officials said.
From 1973, he was a police officer in Exeter and Auburn. He was fired six years later for shoplifting a can of dog repellent and a hammer from a drugstore, Sacramento County Sheriff Scott Jones said.
"Very possibly he was committing these crimes during the time he was employed as a peace officer, and obviously we'll be looking into whether it was actually on the job," Jones said.
Exeter police Chief John Hall said this week's arrest was "absolutely shocking."
"That someone can commit such heinous crimes, and finding out someone in a position of trust could betray that is absolutely unbelievable," he said.
Save Mart, the Modesto-based supermarket chain, said DeAngleo had worked as a mechanic at the chain's distribution center in Roseville, a suburb of Sacramento, spokeswoman Victoria Castro said. He retired in 2017 after working for the company for 27 years, she said.
"None of his actions in the workplace would have led us to suspect any connection to crimes being attributed to him. We are working with the Sacramento County district attorney's office on their investigation," Castro said.
DeAngelo faces capital murder charges in the killings of Katie and Brian Maggiore in 1978. He's being held without bail in Sacramento and will be arraigned Friday.
Authorities in Orange and Ventura counties also have accused him in other killings, according to documents and officials.
A reclusive neighbor
DeAngelo's neighbors said they thought he was a little odd. He kept to himself and sometimes yelled at people who got too close to his fence or mowed their grass too early, neighbors said.
But they didn't have any reason to think he was a suspect in the attacks.
Kevin Tapia said he has lived near the suspect for 20 years. In recent years, he said, DeAngelo had become a recluse.
"He's not like an overly creepy person, but he definitely, you know, kept to himself and kind of was ... a little different," Tapia told HLN. "My sister reminded me that when we were kids and we walked by the fence, he would yell at us because he thought we were looking in his yard. But for the most part, the last decade, he's kept to himself."
Jane Carson-Sandler used to live in Citrus Heights, where DeAngelo was arrested, when a masked man broke into her home and tied her up, along with her son, 3. The man then raped her.
"When I think back about all of the lives that he destroyed and all of the folks that he has affected over all of these years, I can't help to get angry," she said. "I want to punch him."
Carson-Sandler became the first of the Golden State Killer's recorded rape victims on June 18, 1976.
That first rape sparked the hunt for the man who authorities say went on to assault and kill more people in California over the next decade.
A family man
DeAngelo had at least three daughters, according to neighbor Tapia.
"Far as I had known, his daughters had grown up and moved out. The other day, we were playing in the backyard. I heard him talking to a young lady and someone told me today his daughter and I think granddaughter moved in with him recently," he said.
From 1976 to 1986, the crimes sowed fear across the state. The attacker also was nicknamed the "East Area Rapist" and "the Original Night Stalker."
While officials would not say what led them to seek DeAngelo's DNA, they said his name emerged in connection with the crimes last week.
Detectives matched a discarded DNA sample from his home to evidence from the investigation. He lived not far from where some of the crimes occurred.
It's been more than 40 years since the Golden State Killer's first recorded attacks, which began in and around Sacramento. No suspect was caught or even identified in the case. Police only had minor details about his looks, along with a sketch from a near-victim.
When the Sacramento-area rapes were first being reported, it was always by women who were alone or with their children. But by 1977, the list of victims had expanded to couples in their homes.
Police believe the East Area Rapist killed a couple walking their dog after they spotted him before he broke into a home in Rancho Cordova, California, outside Sacramento, in February 1978. Those were his first known homicides.
Two months later, an attacker started terrorizing Santa Barbara County, California -- more than 300 miles south of Sacramento. Police didn't realize it at the time, but the attacker's crimes fit the same pattern as Sacramento's East Area Rapist. He attacked women and couples across Southern California from December 1979 to May 1986, and became known as the Original Night Stalker.
He did not leave fingerprints, so authorities had no way to know if it was the same person.
Once DNA tests were available to investigators, they confirmed the same man committed some of the attacks.
Note: Unless stated otherwise, the interviews from this story came from the HLN series "Unmasking a Killer."
© Copyright 2018 CNN. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.
for more features.