A California man was finally vindicated nearly 40 years after being wrongly convicted of killing his ex-girlfriend and her 4-year-old son after DNA tests proved his innocence.

Craig Richard Coley, 70, was immediately released from a state prison in Lancaster on Wednesday after Gov, Jerry Brown issued a pardon of the wrongly convicted man.

Brown wrote in his pardon that Coley has been a model inmate for 38 years, avoided gangs and violence, and dedicated himself to religion.

"The grace with which Mr. Coley has endured this lengthy and unjust incarceration is extraordinary," Brown wrote.

Coley has maintained his innocence throughout his nearly four-decade imprisonment.

He was arrested on Nov. 11, 1978 after 24-year-old Rhonda Wicht and her 4-year-old son, Donald Wicht, were found dead in her Simi Valley apartment. Rhonda Wicht was strangled, apparently with a macrame rope, and her son was suffocated. Investigators quickly zeroed in on Coley, who had broken up with Wicht shortly before she was killed.

Coley's first trial in 1979 resulted in a hung jury, with jurors unable to resolve an impasse that left them 10-2 in favor of guilt, according to a news release issued by the police chief and district attorney. He was tried again in 1980, found guilty and sentenced to life without parole.

Brown said he asked the state parole board to look into Coley's conviction more than two years ago, and former law-enforcement officials said they believed he was wrongfully convicted or framed.

Simi Valley Police Chief David Livingstone and Ventura County District Attorney Gregory Totten, who have supported Coley's request for clemency in past, said they cannot stand by the evidence used in his conviction.

Livingstone and Totten said they began reviewing the case last year after a retired detective raised concerns about Coley's guilt. The trial court 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 did not find Coley's DNA on one key piece of evidence used in the conviction, but they did find DNA from other people, whom authorities have not publicly identified.

"As district attorney, I must tell you I look forward to the day when I can shake Mr. Coley's hand, apologize to him for the injustice he suffered," Totten said at a news conference Monday.

The Associated Press contributed to this story.