A Queens man has been arrested for buying illegal firearms that he allegedly planned to use for a terror attack on Times Square.

Ashiqul Alam, a 22-year-old permanent U.S. resident with Bangladeshi citizenship, was arrested on Wednesday following a wide-ranging undercover operation that first began last summer. According to a complaint filed by the U.S. Attorney's Office, Alam repeatedly discussed his plans to kill civilians in Times Square—at various points plotting to use grenades, a suicide bomb, and assault rifles.

In the month of January, Alam took two "recon" trips to Times Square with the undercover agent Sean Dillon. According to Dillon's testimony, Alam decided then to carry out the attack on Duffy Square—at 47th and Broadway—because it would "make more impact."

During those trips and others, Alam also expressed admiration for Osama bin Laden and ISIS, and spoke of his desire to "shoot down fags," according to the complaint. He wore glasses, but told the undercover officer that he'd scheduled an appointment for Lasik eye surgery because he did not want to be known as the "Blind Terrorist."

"I want to die fighting man," he allegedly said to Dillon while driving to a shooting range in Pennsylvania. After receiving a shooting lesson, Alam is said to have settled on using firearms to carry out his attack, declaring: "Damn, I want to carry that gun all the time."

His arrest on Wednesday came not on terrorism charges, but for allegedly buying two Glock pistols with their serial numbers removed from a different undercover agent. It's unclear whether Alam will face terrorism charges, and a spokesperson for the U.S. Attorney's office did not respond to Gothamist's request for comment.

In addition to Times Square, Alam also allegedly spoke of blowing up the World Trade Center and assassinating government officials in Washington D.C.

Law enforcement sources tell the NY Times that the 22-year-old's plans were "aspirational" and that he did not pose an "immediate threat." One law enforcement source said that the man had not been charged with any terrorism-related crimes.

In 2010, a man left a car filled with explosives in Times Square; police officers later discovered that the device had malfunctioned before it detonated. The would-be bomber, Faisal Shahzad, was arrested and sentenced to life in prison. A year and a half ago, a man tried to set off a bomb in a subway station near Times Square.

About 380,000 pedestrians walk through Times Square daily, and as many as 450,000 pass through on the busiest days, according to the Times Square Alliance.

The suspect was due in Brooklyn Federal Court on Friday.

With Jake Offenhartz