Updated

Federal prosecutors say a South Florida man arrested last month plotted to set off a bomb in New York City to avenge deaths in Afghanistan.

Prosecutor Karen Gilbert said during a detention hearing Tuesday that 20-year-old Raees Alam Qazi traveled to New York on Nov. 23 to obtain explosives and conduct an attack on an unspecified target. But Qazi was not successful and returned to Florida on Nov. 27.

Gilbert says recordings indicate Qazi was a lone wolf with allegiance to al-Qaida. Qazi told the FBI after his arrest he changed his mind about the attack.

Qazi and older brother Sheheryar Alam Qazi are accused of providing material support to terrorists and attempting to obtain a weapon of mass destruction. Both have pleaded not guilty.

The brothers are naturalized U.S. citizens originally from Pakistan.