Alhaggagi allegedly opened several Twitter and Facebook accounts in 2016 for ISIS supporters. He then allegedly told an undercover FBI agent that he wanted to kill 10,000 people in the Bay Area with bombs and rat-poison-laced cocaine, the Chronicle reported, citing court documents.

He met with the undercover agent, pointed out locations for terrorist attacks and brought three backpacks to be used in a future attack to a storage locker, the paper reported. But Alhaggagi broke off talks with the agent after their last meeting.

“The government sent out an undercover agent to get Amer to actually do something, take a step toward a terrorist offense. He just wouldn’t do it.”

- Mary McNamara, defense attorney

His attorney, Mary McNamara, told the East Bay Times that Alhaggagi’s actions were “stupid mistakes” and he “had no intention to do anything.” She called the government’s action a “failed sting operation.”

“The government sent out an undercover agent to get Amer to actually do something, take a step toward a terrorist offense,” she said. “He just wouldn’t do it.”

He faces a maximum of 47 years in prison. But McNamara told the Chronicle her client was “being slammed by the system” and hoped to get the sentence down to just six to seven years.

“This is really a case about what the appropriate sentence should be, and here is a young guy who is immature, said some stupid things online, and the FBI sent out their best people to try to get a sting operation going,” she said.

Alhaggagi was being held without bail in Glenn E. Dyer jail in Oakland. His sentencing was scheduled for November.