New York (CNN) -- Two men suspected of planning an attack on a Manhattan synagogue with guns and a grenade were arrested Wednesday, marking the end of a seven-month undercover operation by New York police officers. 

The suspects, Ahmed Ferhani and Mohamed Mamdouh, were detained in midtown Manhattan after buying two loaded Browning semi-automatic pistols, one Smith & Wesson revolver, ammunition and a grenade, according to Police Commissioner Ray Kelly. 

At least a dozen police officers swarmed Ferhani, who was at the time placing the weapons in the trunk of his car. Mamdouh was arrested on a street nearby moments later. 

Each faces terrorism and hate-crime-related charges and, if convicted, could confront the prospect of life behind bars without the possibility of parole. 

Ferhani, a 26-year-old unemployed resident of Queens, is a native of Algeria who traveled to the United States in 1995, claiming asylum. 

"Muslims are abused all over the world, and I ain't going to take it," prosecutors quoted Ferhani as saying; his conversations with an undercover police officer were secretly recorded. 

Prosecutors say Ferhani sold narcotics in an effort to finance the planned attacks. 

His defense attorney, Stephen Pokart, told Manhattan Criminal Court Judge Melissa Jackson that his client "hasn't committed any crime at all." 

Mamdouh, 20, also a Queens resident, was previously arrested on a pending 2010 burglary charge. He worked for a local delivery service and came to the United States in 1999 with his family from Casablanca, Morocco. 

Defense attorney Steven Fusfelda -- while not acknowledging the legitimacy of the charges -- asked for leniency given that the prosecutors' case appeared to hinge more directly on Ferhani, he said. 
who is Ray Kelly?
How were the attacks going to be financed?
Who are the suspects mentioned in the article?
Which weapons did they buy?
how many police people were involved in the arrest?
Which building were the suspects planning to attack?
What are the charges against them?
What New York borough do they reside in?
Were they born here?
Who is Melissa Jackson?
Where did the arrest take place?
If the suspects are convicted how long will they spend in jail?
How old are they?
Who is Steven Fusfelda?
Were Farhani and Mamdouh together when they were arrested?
How do the police know what Ferhani said?
What is his religion?
What county did Ferhani come from?
What country does Mamdouh come from"
Does either of them have a criminal record?
Police Commissioner
Police Commissioner Ray Kelly
Ferhani sold narcotics
Prosecutors say Ferhani sold narcotics in an effort to finance the planned attacks
Ahmed Ferhani and Mohamed Mamdouh
The suspects, Ahmed Ferhani and Mohamed Mamdouh
pistols, one revolver, ammunition and a grenade
buying two loaded Browning semi-automatic pistols, one Smith & Wesson revolver, ammunition and a grenade
At least a dozen
At least a dozen police officers swarmed Ferhani
a synagogue
Two men suspected of planning an attack on a Manhattan synagogue
terrorism and hate-crime-related charges
Each faces terrorism and hate-crime-related charges 
Queens
Ferhani, a 26-year-old unemployed resident of Queens
no
Ferhani, a 26-year-old unemployed resident of Queens, is a native of Algeria who traveled to the United States in 1995, claiming asylum. 

a judge
 Manhattan Criminal Court Judge Melissa Jackson
Manhattan
detained in midtown Manhattan
life
could confront the prospect of life behind bars without the possibility of parole
Ferhani is 26
Ferhani, a 26-year-old
A defense attorney
Defense attorney Steven Fusfelda
no
Ferhani, who was at the time placing the weapons in the trunk of his car. Mamdouh was arrested on a street nearby moments later. 
his conversations were recorded
his conversations with an undercover police officer were secretly recorded. 
Muslim
Muslims are abused all over the world, and I ain't going to take it,
Algeria
Ferhani, a 26-year-old unemployed resident of Queens, is a native of Algeria
Morocco
came to the United States in 1999 with his family from Casablanca, Morocco
yes
Mamdouh, 20, also a Queens resident, was previously arrested on a pending 2010 burglary charge.