The feds Friday arrested a 22-year-old man whom they say wanted to carry out a lone-wolf terrorist attack in New York City’s fabled tourist destination Times Square.

Federal prosecutors say Ashiqul Alam of Jackson Heights, Queens, was arrested Thursday in an FBI sting after agreeing to purchase, as part of his plan, a pair of 9mm Glock semiautomatic handguns whose serial numbers had been obliterated.

“As alleged, Ashiqul Alam bought illegal weapons as part of his plan to kill law enforcement officers and civilians in a terrorist attack on Times Square,” Brooklyn U.S. Attorney Richard Donoghue said.  “What he did not know was that he was buying weapons from government agents, who were monitoring his plans and intervening to prevent those plans from escalating into deadly violence.”

TIMES SQUARE GRENADE-ATTACK PLOT THWARTED AFTER 'LONE WOLF' SUSPECT ARRESTED: REPORTS

The complaint says Alam repeatedly expressed a desire to purchase firearms and explosives to use in a terrorist attack.

He was also accused of identifying two targets, either Times Square or Washington, in order to kill a senior government official and of traveling to Times Square on “recon” trips.

He allegedly considered many ways to conduct such an attack, including by using a suicide vest and obtaining AR-15 assault rifles to kill law enforcement officers.

Alam was detained on a weapons charge and WNBC-TV cited federal law enforcement officials as saying he was not expected to face terrorism charges, although he made comments that were jihadist in nature.

The complaint says he praised the 9/11 terror attack with an undercover FBI agent.

ISIS PLOTTED TO SEND WESTERNERS TO US THROUGH MEXICO BORDER: REPORT

“The mission is a complete success, thousands of American soldiers died and trillions of their moneys are gone in the war,” the complaint quotes him as saying.

He is a legal permanent resident from Bangladesh with a green card, the station reported. He lives with his parents.

CLICK HERE TO GET THE FOX NEWS APP

Prosecutors said Alam underwent Lasik eye surgery in April, telling the undercover, “Let’s say we are in an attack, right, say that my glasses fall off.  What if I accidentally shoot you?  You know what I mean.  Imagine what the news channel would call me the ‘Looney Tunes Terrorist’ or the ‘Blind Terrorist.’”