A California man will receive a $21 million settlement for spending nearly 40 years in prison after he was wrongly convicted of murdering his ex-girlfriend and her four-year-old son.

Craig Richard Coley, who was released from prison in November 2017 at the age of 70, agreed to the huge payout on Saturday.

Coley was convicted of killing his 24-year-old ex-girlfriend Rhonda Wicht and her son Donald at her Simi Valley home in 1978.

After nearly four decades in prison, Coley was finally granted a pardon by then- California Governor Jerry Brown at the end of 2017.

Craig Richard Coley, who was released from prison in November 2017 at the age of 70, agreed to the $21 million payout on Saturday after he was wrongly convicted of a double murder. He is pictured above in February this year

The city of Simi Valley announced on Saturday they had now reached the $21 million settlement with Coley.

'While no amount of money can make up for what happened to Mr Coley, settling this case is the right thing to do for Mr Coley and our community. The monetary cost of going to trial would be astronomical and it would be irresponsible for us to move forward in that direction,' City Manager Eric Levitt said.

Coley was also separately awarded $2 million soon after his release, which was the largest payout ever from the Victim's Compensation Government Claim Board.

In that payout, he was given $140 for each of the 13,991 days he was wrongly imprisoned.

His conviction was eventually overturned due to advances in DNA technology and faulty evidence.

Police found Wicht beaten and strangled with a rope in her apartment on November 11, 1978, while her son had been smothered to death in his bed.

Coley, who had broken up with Wicht just days earlier, was arrested on the same day police found the bodies.

Coley was wrongly convicted of killing his 24-year-old ex-girlfriend Rhonda Wicht and her son Donald at her Simi Valley home in 1978. Wicht was found beaten and strangled with a rope, while her son was smothered in his bed

His conviction was eventually overturned due to advances in DNA technology and faulty evidence. Coley claims a former police detective framed him for the murders by destroying crucial evidence

Authorities maintained that Coley, who was the son of a retired police officer, was angry and despondent after learning Wicht was breaking up with him.

Coley's first trial resulted in a hung jury, with jurors split 10-2 in favor of conviction. He was tried again in 1980, found guilty and sentenced to life without parole.

For the next 39 years he served his sentence while steadfastly maintaining that he had never killed anyone.

During his decades in prison Coley was cited as a model inmate, avoiding gangs and violence and embracing religion.

In an application for clemency that Coley himself filed from prison several years ago, he said a former police detective had framed him by destroying crucial evidence.

'The crimes were not committed by me and had the detective not destroyed the exonerating evidence (including semen and hair), the real suspect(s) could have been apprehended,' Coley said.

Coley, pictured above following his release, has previously said the money can't make up for what he called the 'worst nightmare' of spending 13,991 days in prison

He named a retired Simi Valley police detective he said could corroborate his story.

Police began reviewing his case in 2016 after a retired detective expressed concerns about his conviction and believed Coley was either wrongfully convicted or framed.

The trial judge had ordered evidence destroyed after Coley exhausted his appeals, but investigators retrieved records from Coley's relatives and located biological samples at a private lab.

Using advanced techniques not available at the time of his trial, technicians didn't find Coley's DNA on a key piece of evidence used to convict him.

Instead they found DNA from an unknown man.

Coley also had an alibi for the time of the killings and detectives later disproved sworn testimony from a witness who placed him at Wicht's apartment.

He has previously said the money can't make up for what he called the 'worst nightmare' of spending 13,991 days in prison.

Of the $21 million that Coley will be awarded, Simi Valley city said they will pay about $4.9 million with the remainder to be made up by other sources, including insurance.