New York (CNN) -- An Algerian man convicted of plotting to bomb synagogues and churches in New York was sentenced Friday to 10 years in state prison, the Manhattan district attorney's office said.
Ahmed Ferhani, 28, was arrested in May 2011, at the end of an eight-month undercover operation by New York police officers. In December 2012, Ferhani pleaded guilty to multiple charges including criminal possession of a weapon and conspiracy to commit crimes of terrorism.
"Ferhani posed a real threat to New York's Jewish community, eagerly purchasing a hand grenade, two guns and 150 rounds of ammunition from an undercover officer as part of Ferhani's stated intention to attack and then 'blow up a synagogue in Manhattan, and take out the whole entire building,'" Police Commissioner Raymond Kelly said in a written statement.
According to the defendant's guilty plea and documents filed in court, between October 2010 and May 2011, Ferhani conspired to bomb synagogues and churches in Manhattan to send a message of violence to non-Muslims, including American Christians and Jews.
Ferhani told an undercover detective that he was selling drugs to fund his plan, according to a release from District Attorney Cyrus Vance.
Ferhani's guilty plea marked the first time a terrorist or would-be terrorist had been convicted on state terror charges since the New York anti-terror laws were passed shortly after September 11, 2001, Vance said in a prepared statement.
Fehrani's attorney, Lamis Deek, said her client is guilty of illegal arms purchases, but that undercover officers were the ones who had an influence on and provoked his actions.
Deek added that the NYPD pushed Fahrani to make threatening claims that he would blow up synagogues, despite knowing that her client was financially desperate and had a history of mental illness.
CNN's Rande Iaboni contributed to this report.