A man in Chicago was sentenced Monday to 16 years in prison for detonating what he apparently thought was a 1,000-pound car bomb outside a crowded bar that was designed to level the block and kill hundreds of people in 2012.

Prosecutors had pushed for a 40-year-prison term for Adel Daoud while the defense argued he should be out by 2021.

U.S. District Judge Sharon Johnson Coleman also imposed 45 years of supervised release.

The case was one of the longest-running, and perhaps one of the strangest, terrorism cases in Chicago's history.

AGENT: DAOUD ASKED ABOUT ATTACKING NON-MUSLIMS BEFORE STING

Standing before Coleman in orange jail clothes and leg chains during his three-day sentencing hearing last week, Daoud apologized for agreeing to go along with the terror plot and claimed he no longer harbored a desire to kill.

"I'm sorry for taking the court's time, for making my parents cry, for making a bad name for the Muslim community and I'm sorry to the United States of America," he said Wednesday.

Daoud, who is now 25, said he listened in disbelief to secret FBI recordings of him talking about killing non-Muslims. He said he kept asking himself: "Can that really be me?"

Troubled by his lengthy Internet ramblings, the FBI opened its investigation into Daoud in May 2012. Two months later, Daoud crossed paths with an undercover agent he believed to be the cousin of someone who'd been chatting with him online. Daoud was said to have continued to espouse radical ideas in his recorded conversations with the undercover agent and even suggested potential targets for an attack, including Chicago's Navy Pier, bars, military offices and the Woodfield Mall.

He ultimately decided on setting off a car bomb at the popular Cactus Bar and Grill. When the undercover agent warned Daoud "people are going to die," Daoud responded, "Yeah, that's the point. It has to be at least a hundred people."

Daoud, from the Chicago suburb of Hillside, was arrested in an FBI sting in September 2012 after he pushed a button on a device he apparently believed would trigger a real bomb. Undercover agents supplied Daoud with a fake bomb, however.

SENTENCING IN TERRORISM CASE TO FOCUS ON MAN'S MENTAL STATE

Daoud entered an Alford plea in November, saying at the time that he accepted the "factual basis" of the charges against him but denied culpability and maintained his innocence.

In addition to the federal terrorism charges, Daoud also was convicted of soliciting an agent's slaying and for attacking an inmate in jail.

Daoud was supposed to go on trial in 2016, but Coleman ruled he was mentally unfit. The judge said Daoud sincerely believed the Illuminati and other shadowy figures were out to get him.

Last week, prosecutors played a video of Daoud in a car heading to the Chicago bar. In it, his hands were cupped in a prayer-like pose and he could be heard asking God to make the attack successful and acknowledging it would be the first "but not our last" attack.

Daoud's lawyer Thomas Durkin argued his client's demeanor made it obvious he had mental issues and that prosecutors could have structured a sting around a less serious crime, such as sending money to a terrorist group "to get him off the street." Instead, he said, the government wanted Daoud locked up for "mass murder based on something they created."

“This kid, this American kid who was lost at sea, deserves a chance to have a life,” Durkin said.

Prosecutor Barry Jonas noted that the defense pointed to how Daoud suggested an attack with "flying cars" as proof he was psychologically unstable.

CLICK HERE FOR THE FOX NEWS APP

"Flying cars actually exist, judge," Jonas said. "He talked about putting bombs in flying cars."

The prosecutor, who cited magazines describing planes with retractable wings, added, "It's chilling."

The Associated Press contributed to this report.