The allegations were terrifying when the case broke open seven years ago.
An al-Qaida cell had established a base in Lodi, where three of the world's most wanted terrorists including Ayman al-Zawahri, the group's second in command had been seen at a mosque.
An American-born youth who grew up in Pakistan had been trained there to kill U.S. citizens, studying weapons, explosives and hand-to-hand combat, and using a photo of President George W. Bush for target practice.
An undercover FBI informant had infiltrated the Lodi mosque to ferret out terrorists while the nation was fighting the Taliban and al-Qaida.
In the end, many of the spectacular allegations from a four-year FBI probe fizzled, and plans for attacks on U.S. soil were never uncovered.
Still, a jury in 2006 found a 24-year-old cherry packer guilty of international terrorism. And on Wednesday, a divided panel of the 9th U.S. Circuit Court of Appeals upheld the conviction of Hamid Hayat, a Stockton-born man with a seventh-grade education who is now serving a 24-year prison sentence in Arizona.
Two members of the three-judge panel concluded that Hayat's trial in federal court in Sacramento had been handled properly by U.S. District Judge Garland E. Burrell Jr. and that Hayat's convictions on providing material support to terrorists and lying to FBI agents should stand.
Two liberal members of the circuit, Judges Mary M. Schroeder and Marsha S. Berzon, formed the majority opinion. Berzon authored it.
The third panelist, Judge A. Wallace Tashima, sharply dissented, writing that some of the testimony allowed against Hayat could be considered "laughable" and that the government essentially convicted Hayat for a crime he might have committed, not one he had.
"This case is a stark demonstration of the unsettling and untoward consequences of the government's use of anticipatory prosecution as a weapon in the 'war on terrorism,' " wrote Tashima, who is considered a moderate-to-liberal judge.
Charges related to the case against Hayat's father, an ice cream street vendor, were dropped in return for a guilty plea to a less serious charge.
Legal wrangling in the case is expected to continue, just as fallout from the FBI probe still resonates within the region's Muslim population.
"Everybody at the Lodi mosque is scared because they think there are still informants in every mosque," said Taj Khan, a trustee for San Joaquin Delta College and a leader of the Lodi mosque where the Hayats worshipped.
"I think a great injustice has been done," Khan said. "Hamid Hayat is a young, impressionable kid, and the FBI didn't do him any good, questioning him without the presence of an attorney. I think the guy is innocent and needs to be free."
McGregor Scott, who was the U.S. attorney in Sacramento at the time of the prosecution, disagreed.
"We now have a jury that has rendered a guilty verdict, a trial judge who has denied a motion for a new trial and an opinion from a federal appellate court affirming those actions," Scott said. "I think this all sends a clear message that it was a righteous prosecution and a just result.
"Hamid Hayat remains a terrorist convicted in the open courts of this country."
Informant sent to Lodi
Dennis Riordan, a San Francisco appellate specialist who represents Hayat, said he will ask for a rehearing before an expanded circuit panel of 11 judges.
Failing that, Riordan said, he will file a habeas petition in Sacramento federal court. That is a civil pleading, attacking a conviction and sentence.
The centerpiece of the Hayat petition will be that his trial lawyer, Wazhma Mojaddidi, was "incompetent and later admitted she was incompetent," Riordan said. "She had never handled a criminal case. What she did was inexcusable."
Mojaddidi said Wednesday, "Most of the trial was jointly with Johnny Griffin," who represented Hayat's father, Umer. "I was in the case primarily because of my Muslim background, language skills and ability to analyze evidence. I admit my inexperience may have affected Hamid's case. I did the best job I could under the circumstances. I believe I represented him competently."
The appeal has included defense accusations that the jury foreman used racist remarks to express his disdain for Hamid Hayat; that a decorated former FBI agent was improperly prevented from testifying on Hayat's behalf; and that a government expert was allowed to testify but Burrell refused to let a defense expert testify on the same subject.
Although federal officials have cited the case to Congress as a hallmark of the government's anti-terror victories since the Sept. 11, 2001, attacks, others have portrayed it as a stunning overreach by prosecutors.
Hamid Hayat's lawyer depicted him as an unwitting victim of an FBI informant known as "Wildcat," who fed agents outlandish tales while being paid $200,000 for his services.
The informant, Naseem Khan, a former Taco Bell manager who held himself out as a computer expert, became a central figure in the FBI's probe.
The case had its origins one month after 9/11, when FBI agents went to see Khan as part of a money-laundering investigation. Khan was 28 at the time, a Pakistani immigrant living in Oregon. As it turned out, the FBI agents had the wrong Naseem Khan. But while talking with them, he said he had seen al-Zawahri, then Osama bin Laden's second in command, at a Lodi mosque in 1999.
The FBI hired Khan, paying him $3,000 to $4,500 a month plus expenses, and dispatched him to Lodi in December 2001 to find terrorists.
The government later would concede that neither al-Zawahri nor the other top terrorists named by Khan were ever at the Lodi mosque.
Calls secretly taped
In August 2002, Khan met Hamid Hayat, who was 19 and living in his parents' garage. Khan secretly recorded seven of his conversations with Hayat, who made anti-American and anti-Semitic remarks and claimed to know Pakistanis who had participated in jihad.
When Hayat traveled to Pakistan in April 2003 with his family, Khan recorded his phone conversations with Hayat, including one in which "Khan scolded Hayat for being lazy and not going to a training camp," court papers state.
"In response, Hayat protested that the camp was closed during hot weather and that, had the camp been open, 'he would have been there.' "
According to court papers, Hamid Hayat also told Khan "of his family's involvement in terrorist activities," including an uncle who ran a madrassah and told students studying there to "leave and go to terror training camps."
Hamid Hayat returned to the United States in 2005, and FBI agents questioned him in June of that year at his parents' home and the FBI field office in Sacramento. The Sacramento interviews took place in four blocks that began at midmorning and lasted through the night.
During the second one, Hayat told agents he had been at a camp for a few days in 2000 and had witnessed weapon training, and that in 2003 he had received pistol training.
In the third interview, he said "he had attended a camp to train for jihad and said he was trained to use a pistol and rifle and taught how to kill American troops," Khan said.
Hayat was arrested and ultimately convicted on four counts. His father, Umer Hayat, had been charged with making false statements, but a separate jury deadlocked in that case. The elder Hayat eventually pleaded guilty to lesser charges unconnected to his son, and was sentenced to the 11 months he had been jailed while awaiting trial.
HAMID HAYAT TIMELINE
October 2001: FBI agents hire an Oregon Taco Bell manager as an undercover informant after he reports possible terrorist ties to a Lodi mosque.
August 2002: An informant, nicknamed "Wildcat," meets Hamid Hayat, who is living in parents' garage in Lodi.
April 2003: Hayat trav- els with family to Pakistan.
May 2005: Hayat returns from Pakistan and is questioned about terror camps and training.
June 2005: Hayat arrested after lengthy questioning by agents at FBI's Sacramento office. He finally tells them he trained at a terror camp to kill American soldiers.
April 25, 2006: Hayat convicted by jury in Sacramento federal court of ter- rorism charges and lying to FBI. Later sentenced to 24 years in prison. A sep- arate jury, on the same day as Hamid Hayat's conviction, deadlocked in the case against his father, Umer Hayat. Umer Hayat later pleaded to a lesser charge and was sentenced to time served.
Wednesday: 9th Circuit panel upholds Hamid Hayat's conviction.
Call The Bee's Sam Stanton, (916) 321-1091. Follow him on Twitter @stantonsam.