EMBED >More News Videos The ABC7 I-Team obtained a recording of Amer Alhaggagi's detention hearing from December. Here are some of the most explosive accusations.

WEST OAKLAND, Calif. (KGO) -- Investigators say a West Oakland man told an undercover agent he wanted to "redefine terror" and kill 10,000 people in support of the terror group ISIS.In an exclusive interview with the head of the San Francisco FBI and from federal court recordings obtained by the ABC7 I-Team, new details are emerging in the government's terror case against Amer Sinan Alhaggagi.Alhaggagi was arrested back in November 2016 on aggravated identity theft charges. But when he went to court a month later, his defense attorney asked for his release on bond in an unusual hearing closed to the public for a case that was ordered sealed by a federal judge. We obtained an audio recording of that detention hearing.His defense attorney told the court the defendant was in many ways a typical American youth who might need counseling. He asked the judge to fashion a bond arrangement that would have Alhaggagi freed with electronic monitoring.But a federal prosecutor revealed details of another case, one Alhaggagi had not been charged in, and convinced Federal Magistrate Kandis Westmore to order the defendant be held in custody.On Monday, FBI Special Agent in Charge John Bennett emphatically reiterated the government's position in an exclusive interview, telling ABC7's Dan Noyes, "This was a case of grave importance for us. This was a clear and present danger for public safety here in the Bay Area."The I-Team was first tipped off to the case almost a year ago, but the FBI asked us to delay reporting the story on behalf of national security and a fear the suspect would flee.While most of the media reports since Alhaggagi's indictment last week focused on his use of social media to promote ISIS, the FBI's top guy in the Bay Area says it went well beyond that.FBI agents began communicating with Alhaggagi online more than four months before he was arrested. The prosecutor told the court the first clue to his identify was when, "He said he wanted to plan to start a huge fire in an area near where he lived and he specifically mentioned the Berkeley Hills as a potential target."The 22-year-old was born in Lodi and grew up in the East Bay. He attended Berkeley High and was living an apartment complex in West Oakland at the time of his arrest. Prosecutors say by the time he was arrested, he had been communicating with a confidential source working for the FBI and they allege Alhaggagi spent months planning attacks and discussing his willingness to kill and be killed for ISIS.The government says this was only one of several violent plans Alhaggagi discussed. Bennett says the FBI's San Francisco office gets hundreds of tips every month, but most of them don't pan out. He said agents moved on this one quickly."This was very serious, this was a top priority for this office, for a good part of a year," he told Dan Noyes.In that December 2016 court hearing, prosecutors revealed Alhaggagi talked about plans to sell cocaine laced with rat poison in Bay Area nightclubs. The undercover agent says he was looking for information on the exact mixture of strychnine and cocaine to use in that scheme. He showed the agent an ISIS bomb-making manual he downloaded on a computer and he sent the agent photographs of guns he said he obtained."He then told confidential source number one, 'I live close to San Francisco, that's like the gay capital of the world. I'm going to handle them right, LOL,' meaning laughing out loud. 'I'm going to place a bomb in a gay club, Wallah or by God, I'm going to tear up the city.' And I quote, 'The whole Bay Area is going to be up in flames,'" the federal prosecutor explained to Judge Westmore in his argument to have Alhaggagi detained.He also told the court how Alhaggagi took the undercover agent, posing as an ISIS supporter from Salt Lake City, on a tour of the Bay Area including the Cal Berkeley campus. The feds say he wanted to plant backpack bombs at the dorms and went along with the undercover agent to set up a storage unit where he would store supplies for his plans.The FBI's investigators say one sign of how serious he was about his support for ISIS came when he showed up at a meeting with the undercover agent at the storage unit with three backpacks to be used to carry bombs.Alhaggagi's lawyer released a statement Friday saying, "Amer is not anti-American and does not support ISIS or any other terrorist organization. He is completely nonviolent and he took no actions to harm anyone."She described him as "a very young and naive man," and said, "it appears he allowed himself to be drawn into conversations that he should have been far more suspicious of."The federal prosecutor says he tried to get a job with the Oakland Police Department.He told the court, "If he was unable to make bombs himself, then his intent was to get employed by a police department and steal weapons from the police department once employed there and in that context, he said and I quote, 'I'm going to redefine terror.'"Oakland police were tipped off by the feds and there was never any chance Alhaggagi would get a job at the department.Hanni Fakhoury of the Federal Defender's Office represented the young man at the detention hearing.Arguing for a bond, he told the judge his client was only accused at the time of identity theft and when it came to the terrorism accusations, "How much of what these allegations are are very stupid and very inappropriate and very disturbing puffery and how much of it was actually intended to be acted out?"Bennett told Noyes, "This rises to something that was more than just puffery and day dreaming. This was something we invested a lot of time and effort into and the FBI does not do that and law enforcement doesn't do that unless there is a clear and present danger."That tip Noyes got last year was a law enforcement bulletin cautioning police the suspect could be armed and wearing an explosive belt. Prosecutors say Alhaggagi boasted about his plans saying he was confident he could kill 500 people but his real goal was to kill 10,000.His family released a statement describing him as peaceful and kind. They insist he is not and never has been radicalized and they said he grew up in this country and loves it here.