New York (CNN) -- An American citizen who pleaded guilty to trying to help al Qaeda was sentenced Wednesday to 15 years in prison, followed by three years of supervised release.
Had he not pleaded guilty, 30-year-old Syed Hashmi faced 70 years in solitary confinement -- a term his lawyer equated to a death sentence.
At the federal courthouse in lower Manhattan, Hashmi's family and friends filled the courtroom and two overflow rooms for his sentencing.
Hashmi entered, wearing a white skull cap, a long beard and a shalwar kameez -- a traditional Pakistani garb of a long tunic with loose pants
He took his seat between his lawyers and refused to rise as Judge Loretta Preska entered the courtroom, shaking his head 'no' when nudged by his defense attorney Sean Maher.
Maher spoke first -- reminding the judge that just six weeks ago, Hashmi had accepted responsibility for his actions by pleading guilty to aiding al Qaeda.
Maher asked the court to consider that his client's actions were impulsive and marked by immaturity.
"Mr.Hashmi has never been a member of al Qaeda or connected to al Qaeda," Maher said.
Then Hashmi read a lengthy written statement beginning with an Arabic prayer from the Quran and swiftly citing various passages in English.
In the midst of one, Judge Preska asked him to slow down so he could be understood by the court reporter.
"I speak quickly because I don't have a chance to speak to anyone," Hashmi said, referring to his three years in solitary confinement.
Hashmi thanked his supporters including many civil rights activists and professors from Brooklyn College where he graduated with a bachelor's degree in political science in 2003.
Sobs could be heard from men and women from the Muslim community in the courtroom, including Hashmi's parents and his brother.
At one point, Hashmi too broke down but kept reading from his statement.
"I left this country in order to seek knowledge to better my religion," Hashmi said between sobs in reference to the degree he was pursuing in England at the time of his arrest.
Hashmi used several Quranic verses to explain his actions.
"But if they seek your help, it is your duty to help them," he said referring to the money and equipment he now admits giving to militants fighting coalition forces.
"I take full responsibility for my actions," Hashmi said. "It was the only time I had the opportunity to help the noble mujahadeen."
Prosecutors said Hashmi had developed an ideology over many years and that al Qaeda depended on individuals such as him to sustain their operations.
"He wasn't helping al Qaeda generally. He knew the gear in his room was going on the backs of militants fighting U.S. soldiers," a prosecutor said in reference to the waterproof clothes and socks recovered from Hashmi's London apartment.
Judge Preska agreed saying, "Al Qaeda has publicly acknowledged the unique value of U.S. citizens to its mission," adding that "Syed Hashmi is a U.S. citizen who developed an anti-American ideology and stood ready to do his part to assist al Qaeda."
Hashmi kept his eyes closed and appeared to be mouthing a prayer as the judge spoke.
Then the judge handed down the sentence.
"I don't think it's a just resolution but it's better than his life being thrown away which very well could have happened," Maher said after the sentencing.
Hashmi was arrested in June 2006 at London's Heathrow Airport.
Federal prosecutors say he is the first American citizen to be extradited from the United Kingdom on terrorism charges. Hashmi is originally from Pakistan but grew up in New York.
He pleaded guilty in April to an offense of trying to transport military gear to al Qaeda.
His lawyers submitted dozens of letters from his family members, friends and from classmates and teachers at his college in Brooklyn.
Many of the letters portrayed Hashmi as a well-educated man who is capable of redemption and worthy of the judge's leniency.
According to a federal indictment issued in 2006, Hashmi, who was known to his associates as "Fahad," conspired to transport "military gear" to al Qaeda forces fighting U.S. troops in Afghanistan.
He was arrested as he prepared to board a flight to Pakistan carrying a large amount of cash.