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

A California man who spent 19 years behind bars for a murder he didn't commit is free after a jury acquitted him on Monday.

Richard Alex Williams, 37, was imprisoned for the fatal 1996 shooting of a driver in south Sacramento. Prosecutors said he was driving the green Mustang that pulled up to the victim and opened fire on him; Williams maintained he wasn't in the Mustang.

Jurors in his trial deadlocked the first time around, but convicted him in a second trial in 1998. He was found guilty of first degree murder with special circumstances, which renders a defendant eligible for life in prison or the death penalty. Williams received a life sentence without parole.

He was also found guilty of attempted murder of two other passengers in the car.

Williams, who is black, worked with an attorney for years to get a new trial. His conviction came under scrutiny last year after a federal judge found prosecutors in his prior trial had removed a potential juror, a black woman, from the jury due to her race.

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Williams was only 18 when he went into prison. Holding a couple pieces of notebook paper on which he had jotted down notes, he presented his own closing arguments Monday, his attorney, Victor Haltom, told NBC News.

"I just poured my heart out to the jury and told them the truth and they heard it," Williams told NBC affiliate KCRA.

Haltom, who has worked toward Williams' release for 12 years, told NBC News Williams' closing arguments were "powerful."

"He said, 'You know, Victor, I've got to speak my piece. I need to tell the jury in my own words I've been living in a cage for 19 years. I need them to hear what I've got to say,'" Haltom said.

Williams "held up pretty well" in prison, Haltom said, "but there were time when he went a little bonkers, just being literally in a cage that long."

Richard Alex Williams spent 19 years in prison and was recently acquitted of murder and released. KCRA

Now that he is out, Williams has been reunited with his family, including an 18-year-old son who hadn't been born yet when he went into prison.

"He's going to get some new clothes and a haircut — clean up, basically. He feels just thrilled," Haltom said.

Williams is also getting acclimated to things that have changed in the last two decades.

"He doesn't even know how to text or email because none of that stuff existed," Haltom said.