The terror suspects' words were bold, authorities say. They boasted about wanting to pose as congregants to blow up synagogues, lauded jihad and martyrdom and proclaimed that Muslims "are getting abused all over the world."
One said he wanted to bomb the Empire State Building, according to authorities. They schemed about how they would avoid getting caught like another terror plotter and strategized about financing their operation by selling guns.
"We gonna be victorious," suspect Ahmed Ferhani said, according to a court document. "Y'all can do whatever _ we gonna win at the end."
The end came before Ferhani and Mohamed Mamdouh got near carrying out their alleged ambitions, which they had unknowingly spilled to an undercover detective over the course of seven months, authorities said Thursday as the two were charged in a rare terrorism case brought under state law, instead of federal laws.
The two were arrested Wednesday moments after Ferhani bought guns, ammunition and an inert hand grenade from another undercover officer, officials said. There was no indication that the plot that's alleged ever put New Yorkers in danger, and no evidence that the men were affiliated with any terrorist organization.
Lawyers for Ferhani, a 26-year-old Algerian immigrant, and Mamdouh, a 20-year-old American citizen of Moroccan descent, said they denied the charges.
"Mr. Ferhani tells me he hasn't committed any crime at all," said his lawyer, Stephen Pokart. Mamdouh's attorney, Steven Fusfeld, said Mamdouh was "upset because he maintains he committed no crime."
While the case echoes other terrorism investigations that have involved the use of undercover officers in recent years, it is one of few brought under a New York state terrorism law passed within six days of the Sept. 11 attacks _ and the first case to use the law as it was initially envisioned, Manhattan District Attorney Cyrus R. Vance Jr. said.
The law was notably used in a murder case against a Bronx gang member; he was convicted in 2007, but an appeals court last fall said his conduct didn't amount to terrorism and ordered his sentence reduced.
The case against Ferhani and Mamdouh falls squarely within the law's bounds, prosecutors say. The men "plotted and took concrete steps to bomb synagogues and kill Jewish New Yorkers as an act of terrorism," Manhattan District Attorney Cyrus R. Vance Jr. said.
Police said the FBI was aware of the investigation and decided not to get involved. The FBI declined to comment.
The men said nothing during their arraignment Thursday. Ferhani, wearing a pinstriped suit and carrying a New York Yankees cap, bowed his head through much of the proceeding. Mamdouh was in jeans. The men were held without bail; if convicted, they could face life in prison.
Ferhani, who is unemployed, moved to the U.S. in August 1995 from Algeria with two siblings and his parents, who claimed asylum after fleeing the war-torn country, authorities said. He has been living in Queens and had been granted permanent resident status by authorities, but he is facing deportation. He had been known to police for some time and was arrested in a robbery case in Manhattan last October.
The two suspects lived blocks from one another in Whitestone, a section of Queens.
"You wouldn't think something like this would come to our neighborhood," said Jim Hartofilis, 57, saying the middle-class, ethnically diverse area prides itself on its tolerance, he said.
Ferhani's father told The New York Times that the accusations were unbelievable.
"Bomb a synagogue? That's not my son."
He said his son had a diverse group of friends, including a Christian girlfriend.
"All people are equal," he told the newspaper. "We don't make a distinction."
Officials refused to give details on how the first undercover officer met Ferhani, who later introduced the officer to Mamdouh.
The Casablanca-born Mamdouh is a taxi service dispatcher. He came to the United States with his parents in August 1999 and is a U.S. citizen, officials said. His attorney said he lives in Queens with his brother and sister, and his parents are local business owners. He is also facing an unrelated burglary case in Queens, Manhattan prosecutors said.
An undercover detective, who secretly recorded many conversations with the two, heard Ferhani say he hated Jews and was fed up with the way Muslims _ especially Palestinians _ were treated around the world, officials said.
"They're treating us like dogs," Ferhani said once, according to Police Commissioner Raymond Kelly.
Ferhani's anger grew over the months, and "his plans became bigger and more violent with every passing week," Vance said.
Ferhani expressed interest in the Empire State Building attack, Kelly said. And Ferhani repeatedly discussed the idea of attacking a synagogue during several meetings with the undercover detective and Mamdouh, the court complaint said. Mamdouh said he "would love to blow that ... up" and emphasized the importance of paying for things with cash instead of credit cards, the complaint said, so they would not get caught like "the one that put the car in Times Square" _ a reference to the failed bombing there last year by Faisal Shahzad.
Ferhani suggested disguising himself as a worshipping Jew so he could infiltrate a synagogue and leave a bomb inside, the complaint said. He also discussed using grenades and carrying multiple guns in case they were caught, according to the complaint.
On May 5, the undercover detective introduced the men to another officer pretending to be an illegal gun dealer at a meeting where Ferhani said he needed the weapons "for the cause," the complaint said.
At a roadside meeting Wednesday on Manhattan's West Side, one of the undercover officers handed Ferhani a bag holding three handguns, three boxes of ammunition and the inert grenade. As soon as Ferhani put the bag into the trunk of a car, he was arrested, the complaint said. Mamdouh had been dropped off nearby and was arrested soon afterward.
New York City police have been on high alert for potential threats to the city since the U.S. raid that killed al-Qaida leader Osama bin Laden last week, though Kelly said the men had no apparent link to al-Qaida.
"We are concerned about lone wolves acting against New York City in the wake of the killing of bin Laden," Mayor Michael Bloomberg said. "Those, perhaps, are the toughest to stop."
Extra security had already been in place at local religious institutions since bin Laden's death, and Jewish leaders said heightened awareness was a part of life.
"The fact that (there are) people who wish to injure and kill Jews is not news," said David Pollack, who helps advise synagogues on security.
Associated Press writers Chris Hawley, Cristian Salazar, Jim Fitzgerald and Tom Hays contributed to this report.