Innocent Man Freed 20 Years After Being Wrongfully Convicted of Attempted Murder

Marco Contreras, 41, walked free Tuesday after a judged ruled he was factually innocent of the 1996 crime.

Years of maintaining his innocence paid off for a former California inmate who was released from prison this week after serving two decades for a crime he did not commit.

Marco Contreras is a free man as of Tuesday, when a judge in Southern California ruled him innocent of the attempted murder of Jose Garcia, who was robbed and shot at a Compton gas station in 1996.

Watch: Man Wrongfully Convicted of Murder Released From Prison After 32 Years

"The court finds the petitioner to be factually innocent," Judge William Ryan said, some 20 years after Contreras was wrongfully imprisoned for life.

The joyful moment was the culmination of years of work by Loyola Law School’s Project for the Innocent.

Cameras rolled as Contreras embraced his mother for the first time as a free man and told the world that he never feared he'd spend his life in prison.

"I just had to be patient and wait," said Contreras.

As attorneys re-evaluated the case, they zeroed in on an erroneous eyewitness identification that ultimately led to Contreras' conviction, despite his assertion that he was asleep after a graveyard shift as a security guard.

A probe by the sheriff's department subsequently determined that Contreras was not only innocent but it also led to the arrest of another suspect.

Read: Man Who Spent 34 Years in Prison for Teen's Murder Is Freed by DNA Evidence, Says He'll Eat Steak

"Newly discovered evidence suggests that a person other than Marco is guilty of the attempted murder of Jose Garcia," Chief Deputy District Attorney John K. Spillane wrote in a letter to the judge prior to his ruling.

Contreras, who pointed to his spirituality when recounting how he got through all those years behind bars, told reporters he intends to restart his life by spending time with family and with a good Mexican dinner.

Watch: Man Wrongfully Imprisoned for 31 Years Gets Just $75 for His Trouble