SACRAMENTO (CBS/AP) — A Lodi man who spent more than 14 years in prison on terrorism charges has been released from prison, nearly two weeks after a federal judge overturned his conviction.

His attorney said 34-year-old Hamid Hayat was freed Friday afternoon from federal prison in Safford, Arizona.

READ MORE: Firefighters Working to Save Giant Sequoias Forced to Flee Advancing Flames

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

READ MORE: San Mateo Deputies Arrest Man Suspected in Stabbing Attack With Wood Stake

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.

MORE NEWS: UPDATE: Southbound Hwy 17 Lanes Cleared After Woman Jumps Off Pedestrian Bridge

© Copyright 2019 CBS Broadcasting Inc. All Rights Reserved. The Associated Press contributed to this report