NEW YORK - An Algerian immigrant to the United States convicted under a rarely invoked New York state terror statute of plotting to blow up synagogues and churches in Manhattan was sentenced on Friday to 10 years in prison.Ahmed Ferhani, 28, pleaded guilty in December to conspiracy as a crime of terrorism, related weapons charges and other crimes. He admitted to conspiring with another man, Mohamed Mamdouh, to bomb synagogues in retaliation for what he viewed as Jewish mistreatment of Muslims throughout the world."This defendant walked far across the bridge to and from terrorism," prosecutor Gary Galperin said. "Now he must stand and watch it burn."Ferhani, arrested in May 2011 after he and Mamdouh discussed their plans with an undercover New York police detective, told Manhattan Supreme Court Justice Michael Obus that he was not the dangerous individual described by authorities."The government has tried to depict me in the worst light," he said. "My spirit has not been broken, and never will be."Mamdouh's case is still pending. His lawyer, Aaron Mysliwiec, declined to comment on Ferhani's sentencing.The case is one of only two brought by Manhattan District Attorney Cyrus Vance under the terrorism statute since the law was passed following the Sept. 11, 2001, attacks. The other involves a Dominican-born US citizen, Jose Pimentel, who was also arrested in 2011 after a police informant secretly recorded him as he bought bomb-making materials and planned to target police stations, according to police.Police characterized Ferhani and Mamdouh as "lone wolf" terrorists with no known ties to Islamist militant groups. They were arrested after purchasing guns, ammunition and what they believed was a live grenade, police said.Ferhani's defense lawyers renewed their argument on Friday that Ferhani suffered from mental problems that made him an easy target for an overeager detective."This was clearly a case of entrapment," his lawyer, Lamis Deek, said following the hearing.Deek said Ferhani agreed to plead guilty because entrapment is a difficult defense to prove and because the sentence was appropriate for what she said was essentially a weapons case. He faces deportation at the conclusion of his prison term.City police commissioner Raymond Kelly said in a statement that Ferhani "posed a real threat" to New Yorkers.Like Ferhani's attorneys, lawyers for Pimentel have argued that the unemployed Bronx man was "prime pickings" for an overreaching police department.A Bronx gang member, Edgar Morales, was the first defendant convicted under the terrorism statute in 2007, but his conviction was overturned when an appeals court ruled that the statute could not be used to prosecute street gangs.When attached to certain offenses, the statute functions as a punitive escalator, allowing for harsher prison sentences."Today's sentencing marks an important first for local law enforcement officials in New York State," Vance, the district attorney, said in a statement.