Federal law enforcement officials foiled an attempted terrorist attack by a Bangladeshi national on Wednesday to blow up the New York Federal Reserve building in Lower Manhattan with what the man believed was a 1,000-pound bomb. 

The officials stressed the public was never in harm's way as the would-be terrorist was actually working with an undercover FBI agent as part of a sting operation. 

The U.S. Attorney’s office for the Eastern District of New York said the defendant, Quazi Mohammad Rezwanul Ahsan Nafis, 21, faces charges of attempting to use a weapon of mass destruction and attempting to provide material support to al-Qaeda.

A law enforcement official told FOX News there is no evidence that Nafis was actually directed by al-Qaeda.

Further, a U.S. official said the defendant's first target was President Obama, which the criminal complaint refers to as "a high-ranking official." 

Nafis, who traveled to the U.S. in January 2012 for the purpose of conducting a terrorist attack on U.S. soil, is currently in federal custody, the officials said.

“The defendant thought he was striking a blow to the American economy,” U.S. Attorney Loretta Lynch said in a statement. “He thought he was directing confederates and fellow believers. At every turn, he was wrong, and his extensive efforts to strike at the heart of the nation’s financial system were foiled by effective law.”

Nafis, who had been living in Jamaica, N.Y., was provided explosives from an undercover FBI agent that he met online and believed to be an accomplice.

The Bangladeshi national had parked a van filled with what he thought was a 1,000-pound bomb outside of the fortress-like building that is located on Liberty Street. He then went to the Millennium Hotel near the World Trade Center where he called what he believed was a cell phone detonator inside the van, which did not explode.

After the suspect raised red flags by posting about Jihad online, the FBI agent made contact about three months ago and helped him plan for the fake attack.

“Attempting to destroy a landmark building and kill or maim untold numbers of innocent bystanders is about as serious as the imagination can conjure. The defendant faces appropriately severe consequences,” Mary Galligan, acting assistant director of the FBI, said in a separate statement. "The FBI continues to place the highest priority on preventing acts of terrorism." 

The criminal complaint alleges that Nafis reported having "overseas connections to al-Qaeda" and "actively sought out" terrorist contacts within the U.S. to assist him in carrying out the attack. One of the individuals he attempted to recruit was actually a source for the FBI, officials said. 

Nafis wrote a statement intended to claim responsibility for the attack, saying he wanted to "destroy America" and believed the best way to do so was to target the U.S. economy, the complaint said. Nafis included quotes from dead terrorist leader Osama bin Laden to justify an attack he expected to kill women and children, officials said. 

Law enforcement officials said the public was never at risk as the plot was a sting operation and being monitored by both the FBI and the New York City Police Department. 

Located at 33 Liberty Street, the NY Fed is believed to hold one of the largest stockpiles of gold in the world. The bank is one of 12 regional Fed banks in the U.S. and works with the Federal Reserve to implement monetary policy and also regulates Wall Street. 

Follow Matt Egan on Twitter @MattMEgan5