Joseph James DeAngelo, 72, was arrested by Sacramento sheriff's officials at approximately 2:30 a.m. Wednesday.
VIDEO: Inside Michelle McNamara's 'obsessive' quest to nab Golden State Killer
DeAngelo has been charged with two counts of murder in a 1978 case in Sacramento and two counts of murder with special circumstances in a 1980 case in Ventura County.
The "Golden State Killer" has been linked to upwards of 50 rapes and 12 murders spanning 10 counties up and down the state of California, Sacramento County District Attorney Anne Marie Schubert said during a Wednesday press conference. More counties are expected to file charges soon.
"We knew we were looking for a needle in a haystack, but we also knew that needle was there," Schubert said.
VIDEO: Officials hope Golden State Killer arrest will bring closure to families
The "Golden State Killer" is also believed to be linked to cases in Orange County. O.C. District Attorney Tony Rackauckas also spoke at the press conference, saying DeAngelo's arrest puts to rest the "haunting question of who committed these terrible crimes."
DeAngelo was fired from the Auburn Police Department in 1979 after he was arrested for stealing a can of dog repellant and a hammer from a drug store, according to Auburn Journal articles from the time. He was also a police officer in Exeter, California, from 1973 to 1976.
The FBI said it has a team gathering evidence at a Sacramento-area home linked to DeAngelo.
Schubert said that DNA helped solve the case in the last six days.
Joseph James DeAngelo - suspect in the East Area rapes and the Golden State murders. pic.twitter.com/vw5la1A8Kf— Eric Thomas (@ericthomaskgo) April 25, 2018
"The answer was always going to be in the DNA," she said, adding that the connection with DeAngelo came in the Sacramento slayings of Brian and Katie Maggiore.
"It is fitting that today in National DNA Day. We found the needle in the haystack, and it was right here in Sacramento," Schubert said.
The killer was dubbed the "East Area Rapist" after his start in Northern California, the "Original Night Stalker" after a series of Southern California slayings, the "Diamond Knot Killer" for using an elaborate binding method on two of his victims and the "Visalia Ransacker."
Armed with a gun, the masked attacker terrorized communities by breaking into homes while single women or couples were sleeping. He sometimes tied up the man and piled dishes on his back, then raped the woman while threatening to kill them both if the dishes tumbled. He often took souvenirs, notably coins and jewelry, from his victims, who ranged in age from 13 to 41.
The notorious killer first struck in Rancho Cordova.
VIDEO: FBI offering $50,000 reward to identify 'Golden State Killer'
"He came in and had a ski mask on and jumped on the bed and had a knife," according to a victim account from the FBI.
He was also a burglar.
"After it was all over and done with, he went through the stuff in the room, took money out of my purse," a victim said.
VIDEO: What we know about suspected 'Golden State Killer'
In the months that followed, a slew of sexual assaults in the east area of Sacramento County and later Contra Costa County took place. The motive was distinctive and brutal.
"Sock stuffed in my mouth, blindfolded, gagged, hands tied, legs tied, and then, you know, pulled me up like this, because I was on my stomach, and put me back in bed and said, 'If you move, I'm going to kill you,'" a victim said.
That was in the late 1970s. But in 2000, DNA evidence confirmed a link between the Bay Area crimes and murders in Southern California during the 1980s. The "East Area Rapist" had become the "Golden State Killer."
O'Malley says she worked with some of DeAngelo's rape victims as a young volunteer at a rape crisis center in 1977. pic.twitter.com/JBvKF45eee— Eric Thomas (@ericthomaskgo) April 25, 2018
The first locally known victims were 24-year-old Keith Harrington and his wife 27-year-old Patrice Harrington, who were killed in their Laguna Niguel home in 1980.
Keith Harrington's brother spoke at Wednesday's news conference, telling reporters that it's time for victims' families to grieve and "bring closure to the anguish that we all suffered for the last 40 odd years."
In 2016, the FBI joined California officials in their renewed hunt for the suspect, and $50,000 reward was announced for his arrest and conviction. He's linked to more than 175 crimes in all between 1974 and 1986.
The long-sought suspect even called some of his victims after the attacks. Some of those calls were recorded by police.
Actor Patton Oswalt, whose late wife wrote the book "I'll Be Gone in the Dark: One Woman's Obsessive Search for the Golden State Killer," tweeted that he hopes to visit the killer.
Click here to read the charging documents for the suspected "Golden State Killer."
Click here for more stories, photos, and video on the Golden State Killer.
KABC-TV and the Associated Press contributed to this report.