NEW YORK - Hamid Hayat, an American citizen of Pakistani descent who spent 14 years behind bars in a one of the most controversial terrorism cases of the post-Sept. 11 era, said Sunday he’s “still in shock” after his release from federal prison in Arizona, according to reports in US media.

Hayat, 35, a resident of Lodi in the US state of California, a farming town with a large Muslim population, was arrested in June 2005.

He was convicted to 24 years in 2007 after being accused of plotting an attack on the United States after attending a so-called training camp in Pakistan. But his conviction was overturned late last month and he was released on Friday.

“I cannot describe the sense of joy that I have felt to be reunited with my family after fourteen years of separation,” Hamid Hayat said. “I will never be able to fully express my deepest thanks to all the people who believed in my innocence and who worked for so long, so hard and in so many different ways to help me regain my freedom.”

He went on to say thank you “from the bottom of my heart. I will never be able to pay back none of you brothers and sisters, none of my supporters. I’m in your guys’ debt for the rest of my life. I’m your guys’ servant till the day of judgement,” he told his community members.

Hamid was a special guest at Eidul Azha prayers, according to media reports.

After leading prayers, Imam Mohamed Abdul-Azeez took to a stage to speak to attendees about the political climate surrounding Muslim Americans. Azeez is the founder of the Tarbiya Institute, an Islamic nonprofit organisation based in Roseville, California, that hosted the celebration.

“We are businessmen and plumbers, engineers and Uber drivers. We are teachers. We are accountants. We are elected officials. We are public servants,” he was quoted as saying. “You, every single one of you, is the best America has to offer.”

Imam Azeez said, “In post-9/11 hysteria, a young Muslim man from our community was set up and was wrongfully convicted of terrorism,” referring to Hamid Hayat. Applause erupted when Hayat walked to the microphone. He opened his mouth, paused and dropped his head. His cousin rushed up to him, holding his left arm, and his sister came to him on the right, wiping tears from his cheeks.

“I’m at a loss for words,” Hayat said. “I’m still in shock. I can’t believe this day came. I still think this is a dream. I wake up, and I still think I’ll be in prison.” Dennis Rioridan, Hayat’s lead attorney, described what happened: In 2003, Hayat had traveled to Pakistan to seek medical treatment for his mother and to find a wife. While he was in Pakistan, he received calls from someone who, Riordan said, was a U.S. government informant, urging Hayat to get training. Hayat refused, the informant threatened him, and Hayat cut communications with the caller. When Hayat returned to California in 2006, federal prosecutors accused him of participating in a terrorist camp in Pakistan and taking part in an al-Qaeda “sleeper cell” in Lodi. Hamid Hayat, who was 22 years old and represented by a rookie attorney at the time, was sentenced to 24 years in prison, for which he served 14 years until his release.

Once Hayat was imprisoned, Riordan took on Hayat’s case. Riordan said a Pakistani journalist and a Pakistani lawyer helped travel around Pakistan to find witnesses who could provide evidence that Hayat never went to a terrorist camp. The witnesses would teleconference into late night court hearings to testify.

In 2018, federal magistrate judge Deborah Barnes issued a 116-page recommendation to the federal judge overseeing Hayat’s case, arguing that Hayat’s conviction should be vacated because Hayat did not have effective representation that could prove his innocence when he was first convicted.

The federal judge, Garland Burrell, found the new testimony from Pakistani witnesses was credible and vacated Hayat’s conviction in late July.

Hayat’s sister, Raheela Hayat, said that when she received a call from Riordan on Friday that her brother was released, she did not tell anyone in the family because she wanted to surprise them. On Saturday morning, she brought her family to the office of the Council of American Islamic Relations, an organization that had been advocating for the release of Hayat.

Her mother “was about to sit down on the chair and right then, Hayat came out of the room,” she said. “They were crying — crying ’cause of joy.”

Azeez of Tarbiya Institute said, “Hamid and many others like him paid the price and they made a sacrifice.”

“Here we are,” he continued. “It’s the great irony that his first public appearance is at the feast of sacrifice, 14 years after he was wrongfully convicted.”