The Americans arrested when buying weapons on Thursday, on suspicion of planning terror attacks on New York synagogues, were apparently angry that the world treated Muslims "like dogs".
Ahmed Ferhani, a 26-year-old said to be of Algerian descent, was heard by undercover police saying that he needed the arms "for the cause" and expressing interest in attacking the Empire State Building.
Mr Ferhani also boasted that he and Mohamed Mamdouh, a 20-year-old of Moroccan descent, would be "victorious" in their attempt.
The pair were detained attempting to buy AK-47s, hand grenades and other weapons. According to police, Mr Fehrani was considering posing as an Orthodox Jew in order to carry out the attack.
Their plot was the 13th projected attack on the city which had been foiled since September 11; police had been investigating Ferhani for several months. Police ruled out that the attack was planned in retaliation for the death of Osama bin Laden.
Manhattan District Attorney Cyrus Vance said of Mr Fehrani: "His plans became bigger and more violent with every passing week."
New York Mayor Michael Bloomberg praised the officers for preventing the attack and added: "We are concerned about lone wolves acting against New York City in the wake of the killing of bin Laden.
"Those perhaps are the toughest to stop."