Image copyright Getty Images Image caption Michelle McNamara, pictured with husband Patton Oswalt, was deep into investigating the unsolved crimes when she died suddenly in 2016

A comedian and author has praised his late wife, Michelle McNamara, for her role in the apprehension of a former police officer suspected of a string of US murders, rapes and burglaries.

"You did it, Michelle," Patton Oswalt said in an Instagram video.

"The cops are never going to say it but your book helped get this thing closed."

McNamara died suddenly in 2016 after years spent investigating the unsolved California crimes for a book.

The book - I'll Be Gone in the Dark: One Woman's Obsessive Search for the Golden State Killer - was completed posthumously and published in February, becoming a bestseller.

On Wednesday, California police said they had arrested a 72-year-old former police officer, Joseph James DeAngelo, in connection with the case.

They said "discarded DNA" had been used to match him to crimes attributed to the so-called Golden State Killer - suspected of 12 murders, 51 rapes and more than 120 burglaries.

Mr DeAngelo has initially been charged with eight counts of murder.

Police have played down any direct role by the book in the identification of the suspect.

But Mr Oswalt sent a message of congratulations to his late wife in an Instagram video.

Asked whether it helped solve the case, Sacramento County Sheriff Scott Jones said the "answer is no".

"It kept interest and tips coming in," he said. "Other than that, there was no information extracted from that book that directly led to the apprehension."

McNamara's husband - best known for playing Remy the Rat in the film Ratatouille and Spencer Olchin in the sitcom The King of Queens - insisted on Twitter that the book played a role, but said his wife would not have cared whether that was acknowledged.

What were the crimes?

Image copyright Sacramento Police Image caption The suspect had been under surveillance before his arrest

The Golden State Killer, also known as the East Area Rapist, Original Night Stalker, and the Diamond Knot Killer is believed to have carried out rapes and murders between 1976 and 1986, killing girls and women aged between 12 and 41.

Prosecutors say the "reign of terror" began in Sacramento and spread to San Francisco and then on to central and southern California. Links between the cases were established by DNA evidence, police say.

Image caption A police reward poster shows photofit pictures of the suspect

The attacker broke into homes at night and then tied up and raped his female victims.

Before fleeing he stole items such as cash, jewellery and identification.

The last case to be linked to the Golden State Killer was the rape and murder of an 18-year-old woman in Irvine, Orange County, in May 1986.