He tried to detonate the Federal Reserve in lower Manhattan, only his bomb was a dud. He asked a contact over Facebook – who was a secret FBI informant – if it was permissible to blow up a country that granted him a student visa. And he cackled in a park about wanting to pull off a terrorist attack so big it would bring Muslims closer to the day they would "run the world."

This is the mind-boggling tale of Quazi Mohammad Rezwanul Ahsan Nafis, a 21-year old Bangladeshi national arrested in New York on Wednesday on terrorism charges. If even a fraction of what the government alleges against him is true, Nafis is simultaneously a dedicated would-be mass murderer and a complete buffoon who, like many jihadi wannabes, set himself up for failure from the start.

The FBI, NYPD and New York's Joint Terrorism Task Force announced on Wednesday that they had thwarted a plot by Nafis to detonate the New York Federal Reserve Bank in a massive suicide bombing. "We will not stop until we attain victory or martyrdom," the feds allegedly have Nafis on video saying. Only the bomb didn't work, because its component parts were provided to Nafis by an undercover FBI agent.

The FBI has a recent history of announcing thwarted terrorist attacks that only came to be because FBI informants or agents convinced the perpetrator to go through with them. If the government complaint against Nafis holds up in court, he was something genuine. The Justice Department alleges that Nafis came to Queens, New York, in January from Bangladesh on a student visa – and quickly began exploring his options for pulling off a terrorist attack. Only Nafis was so inattentive to keeping his operation a secret that he practically stood on a street corner and waved his arms until the FBI and NYPD took notice.

In July, Nafis crossed the radar of an anonymous FBI informant, according to the criminal complaint against him. When they initially spoke on a phone call, Nafis attempted to cover himself with a crude code: He was a fan of "O" (Osama bin Laden), a reader of "I" (Inspire, al-Qaida's English-language webzine for DIY terrorism), and he wanted to pull off "J" (jihad). But the very next day, Nafis was so trusting that he openly discussed on Facebook "Islamic legal rulings" on the permissibility of bombing a country that granted him a student visa. Within a week, was ranting in person to the informant about killing "a high-ranking government official" and boasting of his ties to al-Qaida.

The informant did what informants in these cases do: snitch. He told Nafis that he knew a member of al-Qaida in New York. An excited Nafis attended a meeting with the al-Qaida agent in Central Park on July 24, where he allegedly gushed about wanting to pull off something "very, very very very big, that will shake the whole country, that will make America not one step ahead, change of policy... [but] that will make us one step closer to run[ning] the whole world."

Of course, Nafis was speaking with an undercover FBI agent, less than a month after making contact with the snitch. The closest Nafis came to disbelieving the agent came in a question the following month: "The thing that I want to ask you about is that, the thing that I'm doing, is it under al-Qaeda?" The undercover FBI agent nodded, and that was enough for Nafis, who implored him to tell al-Qaida that he had come up with the plan to bomb the Fed all by himself.

The agent took it from there. He hooked Nafis up with 20 50-pound bags of fake explosives, a van and a storage space for it all; and convinced Nafis not to return to Bangladesh to see his family a final time. Nafis, for his part, gave the agent a thumb drive containing an article he wanted published in Inspire explaining his brilliant plan. Go time was set for Oct. 17, 2012, with the hope of disrupting the presidential election.

On Wednesday morning, the two assembled the bomb, hooked up a cellphone detonator, loaded it into the van, and parked outside the Federal Reserve. They rented a room at a nearby hotel so the agent could film Nafis' video explanation. "We will not stop until we attain victory or martyrdom," he allegedly says, before placing several calls to the detonator device – which was never actually hooked up to a live bomb. The phone, of course, was tapped. Once Nafis called the device, agents had everything they need and arrested him.

It might come out at trial that all or much of this story is untrue. A criminal complaint is not proof. But if the government's portrait of Nafis is even partially accurate, he had more dedication to terrorism than he had brains – which is something that probably reassures counterterrorism operatives who still don't know how to end al-Qaida once and for all.