The hunt for a masked gunman dubbed the ‘Golden State Killer’ who terrorized California during the 1970s and 80s is over after a hunt that spanned decades, police said Wednesday.

Joseph James DeAngelo, a former police officer, was arrested overnight in his home outside Sacramento and is being held without bail in the Sacramento County jail, officials said. The 72-year-old DeAngelo was arrested on a warrant originating from Ventura County, California, on two murder charges. However, police believe DeAngelo killed up to a dozen people, burglarized 120 homes, and committed 45 rapes during a 12-year era of terror.

“We all knew as part of this team that we were looking for a needle in a haystack, but we also all knew that the needle was there,” Sacramento County District Attorney Anne Marie Schubert said at a news conference with Sheriff Scott Jones. “We found the needle in the haystack and it was here in Sacramento.”

Jones said that “discarded DNA” was used to confirm DeAngelo as their prime suspect and arrested him at his home in Citrus Heights. Jones did not explain what he meant by “discarded DNA” but noted that DeAngelo had been monitored for nearly a week and caught him by surprise during the arrest. “This was a true convergence of emerging technology and dogged determination by detectives,” Jones said. “In this case justice was delayed. It wasn’t swift but it will be sure.”

The first charges filed against DeAngelo will be two murder charges in the March 1980 killings of Lyman and Charlene Smith. These charges include special circumstances of murder during the commission of a rape, murder during the commission of a burglary, and multiple murder circumstance. Few details were released about DeAngelo, a Navy veteran and a police officer in Exeter, California and Auburn, California, during the 1970s. DeAngelo was fired from the Auburn Police Department for shoplifting; Jones said that investigators have not determined whether DeAngelo raped or killed anyone while on duty. “We are trying to fill a lot of gaps in his life,” the sheriff said. “We don’t have a full picture yet.”

DeAngelo’s adult children are cooperating with the investigation, Jones added. “We have interviewed some family members,” Jones said. “This was certainly a shock to them.”

Bruce Harrington was also present at the news conference, whose brother Keith Harrington and sister-in-law Patrice Harrington were killed in their Dana Point home in 1980. Following their deaths, Bruce Harrington advocated for an initiative passed by California voters in 2004 that mandated the collection of DNA samples from people arrested in felony cases.

DeAngelo was also dubbed the East Area Rapist and the Original Night Stalker, who was blamed for a spree of crimes across California from 1974 to 1986. His victims ranged from young teenagers to the early 40s. His crimes spanned from Los Angeles suburbs to Sacramento, where a masked gunman raped woman at home alone or with their children, and killed couples, police said. After the killer went underground, police kept looking – even offering a $50,000 reward for information leading to an arrest.

Contra Costa County cold-case investigator Paul Holes told NBC’s Megyn Kelly that the killer followed news accounts of his crimes, keeping steps ahead of investigators by changing how he targeted victims. “He covered his trail very well,” Holes said. “What he didn’t account for was DNA technology.”