Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

SIMI VALLEY, Calif. — The city of Simi Valley, California, has reached a $21 million settlement with a man wrongly imprisoned for nearly 40 years in the killing of his girlfriend and her 4-year-old son.

Craig Coley was released in 2017 after he was pardoned by then-Gov. Jerry Brown, who said DNA evidence and re-investigation proved Coley's innocence.

Simi Valley officials said Saturday that the agreement would mitigate long, costly and unnecessary legal proceedings, the Los Angeles Times reported.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"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," City Manager Eric Levitt said in a statement. The city will pay about $4.9 million and the rest is expected to be paid by insurance and other sources.

The state last year approved a separate, nearly $2 million payment for Coley. He is now 71.

Coley spent 39 years behind bars after he was wrongly convicted of killing 24-year-old Rhonda Wicht of Simi Valley and her son in 1978.

The city's police chief and Ventura County's district attorney asked Brown to pardon him because forensic tests showed Coley's DNA was not on the victim's bedsheet, which contained DNA from an unknown man. Coley had an alibi for the time of the slayings and investigators later disproved testimony from an eyewitness who placed him at the scene.

His parents died while he was in prison after mortgaging their home to pay his legal bills.

Ron Kaye, an attorney representing Coley, said the settlement offers some closure and vindication for his client, though no amount of money can compensate him for the life he missed while imprisoned.

"He now can live the rest of his life, which we hope will be really well into the future, with the security he deserves," Kaye said.

Soon after Coley was pardoned, a judge declared him factually innocent. Simi Valley police have not arrested anyone else in the killings.