SACRAMENTO, Calif. — After more than 14 years in prison on terrorism charges, Hamid Hayat, 36 of Lodi, has been released from prison.

His release comes nearly two weeks after a federal judge overturned his conviction.

RELATED: Judge overturns 2006 terror conviction of California man

Dennis Riordan, Hayat's attorney, told ABC10 that Hayat was freed Friday around 2 p.m. from a federal prison in Phoenix, Arizona.

Hayat, a cherry picker from Lodi in California's Central Valley, was accused of plotting an attack on the United States after attending a terrorist training camp in Pakistan.

He was convicted in 2006 and sentenced to 24 years in prison for providing material support to terrorists.

Hayat proclaimed his innocence and a judge in Sacramento overturned the conviction in July, ruling that Hayat hadn't received a proper defense at trial.

WATCH ALSO: From inmate to graduate, Part 1: how Solano prisoners get ready for life after release.