Mr. Hayat’s lawyers filed an appeal to void the convictions less than an hour after sentencing. The appeals lawyer said there had been jury misconduct, the exclusion of vital witnesses’ testimony and conflict of interest for Mr. Hayat’s trial lawyer.  The trial lawyer, Wazhma Mojaddidi, and the appeals lawyer, Dennis Riordan, say Mr. Hayat is innocent of all charges.  “My client is obviously upset,” Ms. Mojaddidi said. “He has already served two years for a crime he did not commit.”  Family members at the sentencing included Mr. Hayat’s father, Umer Hayat, 49, an ice cream vendor involved in a related case. Umer Hayat also expressed disappointment, repeatedly saying his son was innocent.  “This is a sad day for us,” the father said, “but I am very confident he will get out on appeal. He is innocent. We did not get justice. Justice was not served.”  The father and son, residents of Lodi, a farming town with a large Muslim population, were arrested in June 2005.  Federal authorities were in the middle of a lengthy undercover investigation of Muslims. Hamid Hayat was arrested on returning from Pakistan, where, F.B.I. agents said, he trained at a terrorist camp sometime between October 2003 and November 2004 and lied to the bureau when asked about it.  Umer Hayat was arrested and charged with financing part of the son’s trip and lying to agents. He pleaded guilty to lesser charges and was eventually released for time served.  Although the timing of the sentencing on Monday was coincidental, the United States attorney for the Eastern District of California, McGregor W. Scott, invoked the Sept. 11 terrorist attacks.  “We now stand on the eve of the sixth anniversary of that terrible day,” Mr. Scott said.  He added that there had been no terrorism attacks in the United States since then.  “It is because of prosecutions like this that we have prevented another attack against the United States,” Mr. Scott said.  The defense team has repeatedly questioned the validity of the prosecution’s case, in part because the F.B.I. relied on a paid informer, Naseem Khan, who received more than $200,000 from the government and testified that there was a connection between Hamid and Umer Hayat and Ayman al-Zawahiri, Osama bin Laden’s second in command.  Mr. Scott said he anticipated that Mr. Hayat would appeal, noting that “these rights belong to Mr. Hayat, first as an accused and now as a convicted defendant in our American legal system.”  Basim Elkarra, executive director of the Sacramento chapter, of the Council on American Islamic Relations, said the sentence sent a chilling message.  “The entire Muslim community in Lodi is watching this,” Mr. Elkarra said. The court, he said, “sent a clear message to the Muslim community. You do not speak to an F.B.I. agent unless you have an attorney present.”  A version of this article appears in print on , on Page A20 of the New York edition with the headline: 24-Year Term for Californian In Terrorism Training Case. Order Reprints| Today's Paper|Subscribe
Hamid Hayat, convicted last year of aiding terrorists and lying to the F.B.I., has been sentenced to 24 years in prison.