The FBI and federal prosecutors took Alhaggagi's talk seriously, conducting round-the-clock surveillance and sending an undercover agent posing as an al-Qaida bomb maker to probe the defendant's intentions. The prosecution argues that Alhaggagi's repeated willingness to meet with the agent, his online history including downloading a bomb-making manual and researching strychnine, and his application for a job with the Oakland Police Department are all real actions Alhaggagi took to further his plans.
They're seeking a 33-year prison sentence. The defense, bolstered by the agreement of the federal probation department and a former CIA operative who evaluated Alhaggagi's extremism, is asking for a four-year sentence.
'Manager of Spies'
Former CIA case officer Dr. Marc Sageman was hired by Alhaggagi's defense to apply his decades of experience interviewing jihadi extremists and measure the defendant's intentions.
Sageman testified that he was a "manager of spies" and "ran a war" against the Soviets in Afghanistan during his time with the CIA in the 1980s. He resigned in 1991 and pursued a specialty in forensic psychology, he testified, also applying social science principles to the study of political violence.
He said he studied the 11,000 pages of discovery in the case against Alhaggagi in preparation for an interview that would test two hypotheses.
"He's either trolling people or he's a real jihadi," Sageman testified. "Talk is cheap. There are so many people on the internet claiming all kinds of things."
Sageman said he first tested Alhaggagi by dropping a reference to Abdullah Azzam — a mentor of Osama bin Laden known as the "father of global jihad." Azzam was killed in 1989, several years before Alhaggagi was born, and the defendant didn't know who he was, Sageman testified.
"Every jihadi who I have ever met knew who Abdullah Azzam was," Sageman said.
He said Alhaggagi habitually invented stories.
"He's really a coward," Sageman testified as Alhaggagi grinned. "He doesn't really do anything."
'Slaughter Them With Knives'
Federal prosecutor Waqar Hasib criticized the way Sageman summarized some of Alhaggagi's statements in his report, which was filed under seal.
Hasib seized on Sageman's conclusion that because Alhaggagi has no history of violent crime, he is actually less likely to be dangerous than a randomly selected U.S. citizen.
"Is a randomly picked individual from the United States likely to talk about planting a bomb in a gay nightclub with someone they just met?" Hasib asked.
"No," Sageman said.
"I know how to build bombs," Sageman added. "Mr. Alhaggagi does not know how to build bombs."
Hasib played an audio recording in court of a November 2016 meeting between the undercover agent and Alhaggagi, in which the agent discusses, and agrees with, the defendant's wide-ranging plans for murder and mayhem.
"I want to do several different types of killing," Alhaggagi said on the recording. "I wanna like, do the explosives, kill ‘em with guns, probably like slaughter them with knives."
Sageman said Alhaggagi was continuing his online trolling behavior in real life, seeing how far he could push before someone disagreed.
"The more absurd ideas he had, the more they agreed with it and encouraged him," Sageman testified.
The dispute over whether Alhaggagi is a sincere terrorist or incredibly zealous troll is the central argument in the case.
Sageman said the government mistranslated parts of Alhaggagi's chats in Arabic and took them out of context. He cited gruesome passages punctuated by smiling emojis, and a conversation that on its face appeared to be a discussion about bombs and detonators. Sageman said the chat was really a running joke between teenage boys.
"By detonator, I think he was talking about his phallus," Sageman said.
But the U.S. government argues Alhaggagi followed a course of conduct that began with him contacting Islamic State sympathizers to inquire about making bombs, continued in meetings with the undercover agent and culminated in creating social media accounts to help the Islamic State.
The prosecution says it didn't stop after Alhaggagi's November 2016 arrest. They plan to call two jailhouse informants when the sentencing hearing resumes on Jan. 8 who say Alhaggagi discussed blowing up the federal court building in San Francisco and was seen drawing a schematic of the building.
The defense says the main informant is known to be untrustworthy, and both men are receiving benefits in exchange for their testimony.