Joseph DeAngelo, the man known as the Golden State Killer, has admitted to 13 murders in a deal with US prosecutors meant to spare him the death penalty.

DeAngelo, who was a Californian police officer during his crimes in the 1970s and 80s, was arrested in 2018 after his DNA was found via a genealogy website.

The hearing in Sacramento took place in a large university ballroom, to allow for victims and families to attend.

He also admitted to numerous rapes, burglaries and other crimes.

DeAngelo, 74, is expected to be sentenced to life in prison in August at a second court hearing, where people hurt by his crimes will be allowed to read victim impact statements.

The sentencing is expected to be the culmination of a crime investigation that began in the 1970s and attracted worldwide attention.

DeAngelo’s crimes stretched across the state of California and led to nicknames such as the Visalia Ransacker, the Diamond Knot Killer, the Original Night Stalker and the East Area Rapist. Officials only later realised the crimes were all the work of one man.

The former police officer, Vietnam War veteran and auto mechanic was arrested in April 2018 after police tracked him down by matching his DNA with a genealogy website.

Investigators created a family tree dating back to the 1800s in order to identify him as a suspect.

Detectives followed him and collected a piece of rubbish he had thrown away, finding the same DNA recovered from several crime scenes.

Since then he has been kept in isolation in a Sacramento jail.

Prosecutors from the six counties where his crimes were committed agreed to hold Monday’s hearing at the Sacramento State University auditorium, which can seat 2,000 people, to allow for social distancing.

A crime scene photo released by the FBI

During Monday’s hearing, DeAngelo and his lawyers wore plastic face shields to prevent the spread of coronavirus.

He was brought into the courtroom in a wheelchair and used a cane.

Prosecutors noted his crimes had all taken place between 34 and 45 years ago and called the geographical scope “simply staggering”.

During the hearing, he was forced to say “guilty” to all his crimes and “I admit” to offences for which he had not been charged.

Sacramento County prosecutor Thien Ho said that after he was arrested in 2018, and left alone in an interrogation room, DeAngelo began speaking to himself, seeming to address a person within that he could not control.

“I did all that,” DeAngelo said, according to Mr Ho.

“I didn’t have the strength to push him out. He made me. He went with me. It was like in my head, I mean, he’s a part of me.

“I didn’t want to do those things. I pushed Jerry out and had a happy life. I did all those things. I destroyed all their lives. So now I’ve got to pay the price.”

However, prosecutors have expresses scepticism over whether DeAngelo’s words and actions are authentic, noting he once faked a heart attack after he was sacked from a job for shoplifting.