Quazi Mohammad Rezwanul Ahsan Nafis, a 21-year-old Bangladeshi man in the United States on a student visa and now charged with plotting a bomb attack on the Federal Reserve building in New York City, used Facebook as well as other methods to plan his attack.

Nafis was arrested Wednesday after attempting to detonate what he believed to be a 1,000-pound bomb in a vehicle parked next to his target. However, the explosive device was a fake provided by one of two undercover FBI agents who had been posing as jihadists connected with al-Qaeda.

Law enforcement quickly arrested Nafis and he appeared in court several hours later.

According to court documents, at least some of the early communication between Nafis and an undercover agent happened on Facebook. The online conversations revolved around the legitimacy in Islamic law of conducting jihad against a country entered with a visa:

"During the period between July 6, 2012 and July 8,2012, NAFIS, the CO-CONSPIRATOR and the CHS began to communicate via Facebook, an internet social-media website. During these communications, which were consensually recorded by the CHS, the three discussed certain Islamic legal rulings that advise that it is unlawful for a person who enters a country with a visa to wage jihad there. NAFIS stated that he had conferred with another individual in Bangladesh and was advised that he was not bound by such rulings. Accordingly, NAFIS indicated that he believed that he was free to continue with his plan to conduct a terrorist attack on U.S. soil."

Nafis and undercover agents also spoke on the telephone and communication in other unspecified ways. Nafis first met one of the undercover agents in late July, and that agent posed as Nafis' main assistant until Nafis' attempted attack and arrest on Wednesday.

Image courtesy of iStockphoto, carlballou