A 33-year-old American man living in New York City's Bronx borough faces terror charges after his arrest at a New York airport while allegedly en route to join the Taliban in Afghanistan to kill U.S. soldiers, according to federal court documents.

Delowar Mohammad Hossain, who is originally from Bangladesh and later became a U.S. citizen, was arraigned Friday in federal court in New York City. He was arrested Friday at John F. Kennedy International Airport as he was about to board a flight to Thailand on the first leg of his journey to Afghanistan, prosecutors said.

Hossain is accused of allegedly trying to provide "material support" for the Taliban, a U.S.-designated terrorist group, by joining their ranks.

According to prosecutors, Hossain had been under surveillance since at least September 2018. He was allegedly recorded telling an FBI informant that "attacking the U.S. Army, attacking stuff like that is legitimate because the world is against the American government, not its people."

At one point, according to court documents, he told the informant: "I just want to take a frickin' machine gun and just shoot everybody and kill 'em all."

More than 2,400 U.S. service personnel have died in Afghanistan since the U.S.-led coalition invaded the country after the 9/11 terrorist attacks. The coalition sought to crush the Taliban and hunt down al-Qaeda chief Osama bin Laden.

In the past eight years, almost 80 Americans have gone abroad to join jihadist groups, CBS News reports, although most have sought to join ISIS or al-Qaeda in Syria and Iraq.

This article originally appeared on USA TODAY: US man accused of trying to join the Taliban to kill American soldiers