A suburban Chicago man facing terrorism charges for allegedly trying to set off a bomb in 2012 told a judge Friday he is sane, although he giggled and did impersonations on the witness stand.

Adel Daoud spoke during a hearing to decide his mental competency to stand trial on allegations he solicited the murder of the undercover agent in the terrorism case and attacked a jail inmate in 2015, in addition to the terrorism charges.

Daoud, 22, has denied trying to ignite an inert bomb outside a Chicago bar in an FBI sting.

Speaking against the advice of his attorney, Thomas Durkin, Daoud told U.S. District Judge Sharon Johnson Coleman he often holds conversations with himself "because I don't need a second person," but he denied hearing voices or seeing illusions.

"If I'm crazy now, and I feel this is the best state I've been in, I had to be crazy forever," he said.

Durkin contends Daoud suffers from delusional disorder, a condition he says has worsened in recent months.

"Are you the defendant in this hearing?" Durkin asked during the hearing.

"I am the hostage, yes," Daoud answered.

Daoud's lawyers said they can't work with a man who believes the court system, including his own attorneys, are part of a vast conspiracy that will likely lead to Daoud's beheading.

"Would someone please tell me how I'm supposed to counsel someone who believes you are part of the Illuminati and that I might be part of the Illuminati?" Durkin said.

Prosecutors contend Daoud understands the charges against him, can assist in his own defense and that mental competency exams have determined that while he may hold extraordinary beliefs, he is not delusional or paranoid.

During the hearing, a government psychologist and a defense psychiatrist offered differing opinions about Daoud's mental state, an issue that essentially came down to each expert's assessment of whether or not Daoud is delusional or extremist and idiosyncratic. The judge must determine whether Daoud's mental state meets the legal standard for being able to face trial.

Coleman said she will rule Thursday.