A Jamaica, Queens, man was arrested Wednesday morning after he tried to detonate a van loaded with a 1,000-pound bomb outside the Federal Reserve in Lower Manhattan.

But according to the U.S. District Attorney, the public was never in danger as the bomb was actually made of inert explosives provided to 21-year-old Quaszi Mohammed Rezwanul Ahsan Nafis by an undercover FBI agent.

According to a criminal complaint filed in a Brooklyn court Wednesday afternoon, Nafis traveled to the U.S. from Bangladesh in January of this year for the purpose of conducting a terrorist attack.

Once in the country, Nafis sought out al-Qaeda contacts. However, one of the contacts he made turned out to be an FBI informant.

As Nafis planned his attack, an undercover FBI agent began working with him and eventually supplied him with 20 50-pound bags of what Nafis thought were explosives.

On Wednesday morning, Nafis met the undercover agent at a warehouse and drove to the Federal Reserve, where he parked the van and walked to a nearby hotel. Once there, Nafis recorded a video meant to be released after the attack in which he said “We will not stop until we attain victory or martyrdom.”

Nafis then attempted to detonate the bomb using a cell phone device the undercover agent helped him build.

Throughout the morning, law enforcement officials monitored Nafis, even making sure that he wouldn’t be stopped by counterterrorism units active in Lower Manhattan. He was arrested shortly after the failed attempt.

“The defendant thought he was striking a blow to the American economy. He thought he was directing confederates and fellow believers,” said United States Attorney Loretta Lynch. “At every turn he was wrong.”