Undercover FBI agents arrest 18-year-old American for trying to detonate what he believed was a car bomb outside a bar.

An 18-year-old man who tried to set off what he thought was a car bomb outside a downtown Chicago bar has been arrested and charged in a federal undercover sting operation, authorities said.

Adel Daoud, who lives in the Chicago suburb of Hillside, planned for months for the attack and prayed with a man who turned out to be an undercover agent before attempting to set off a bomb in a Jeep outside a bar, authorities said on Saturday.

Daoud was charged with one count of attempted use of a weapon of mass destruction and one count of attempt to damage and destroy a building by means of an explosive.

The inert explosives posed no threat to the public and were supplied by undercover law enforcement, acting US Attorney Gary Shapiro said in a statement.

Daoud was closely monitored and offered several opportunities to change his mind.

According to an FBI affidavit, Daoud used email accounts starting in about October 2011 to gather and send materials “relating to violent jihad and the killing of Americans”.

Sting operation

Two undercover FBI employees began corresponding with Daoud in May, exchanging several electronic messages with him in which he expressed an interest in “engaging in violent jihad, either in the US or overseas,” the affidavit said.

From late May to mid-June, Daoud sought guidance on whether to carry out an attack in the US, then sought online resources on how to carry out an attack, the affidavit said.

An undercover FBI agent then was introduced to Daoud by one of the undercover employees as a cousin living in New York, the affidavit said.

Daoud listed 29 possible targets, including military recruiting centers, bars, malls and other Chicago-area tourist attractions before picking the bar, the affidavit said.

Daoud met with the undercover agent in a Chicago suburb, and as they drove to downtown Chicago he led a prayer with the agent that the attack would succeed in killing many people, the affidavit said.

In downtown Chicago, Daoud picked up the Jeep that contained the purported explosives from a parking lot and drove it to the targeted bar, the affidavit said. They did not identify the bar.

Daoud walked to an alley about a block from the bar and tried to set off the device in the agent’s presence before FBI agents arrested him, the affidavit said.

Daoud had an initial appearance on Saturday before US Magistrate Judge Arlander Keys in federal court in Chicago.

He is being held pending a detention and preliminary hearing that is scheduled for 3pm on Monday.

Daoud faces up to life in prison if convicted of attempted use of a weapon of mass destruction. The second charge calls for a sentence of from five to 20 years.