Lawyers for a man accused of plotting to blow up New York City's largest synagogue have accused prosecutors of suppressing evidence that should be disclosed to the defense.

On Monday Manhattan state supreme court justice Michael Obus ruled the case against Ahmed Ferhani could proceed. He dismissed claims made by Ferhani's attorney that he is mentally unstable and the victim of police entrapment.

Ferhani, a 27 year-old Algerian immigrant, and co-defendant Mohamed Mamdouh were arrested after police say Ferhani purchased three semi-automatic pistols, 150 rounds of ammunition and an inert grenade from an undercover detective in May 2011, following a seven month investigation of the two.

The men are accused of plotting a violent revenge attack in the name of oppressed Muslims the world over. Authorities say Fehrani suggested growing a beard and payot, the side curls worn by Hasidic Jews, so he could sneak into a Manhattan synagogue and "take out the whole building".

Lamis Deek, one of Ferhani's attorneys agreed that the judge's decision did not come as a shock, but maintained the case against her client is rife with problems.

"We're not surprised at all. It's nothing that we didn't expect," Deek said, but added that she hopes to see further evidence produced in Ferhani's trial and in the months leading up to it.

"We need to know how Ferhani, although he was known to the government to be mentally ill, came to be targeted as a subject of this investigation," she said. "In this case we've received essentially nothing in terms of discovery. We haven't even received audible surveillance recordings. We haven't received the transcripts, although the judge has directed the government to disclose those transcripts."

"There's clearly an intention on the part of the government to suppress evidence," Deek said.

The Manhattan district attorney's office declined to comment.

Monday's ruling focused Ferhani's case alone. The police claim he was motivated by a hatred for Jews and expressed a desire to destroy the Empire State Building and churches, as well as a synagogue. In addition to the weapons he acquired leading up to his arrest, police say Ferhani also sought a bullet-proof vest, a silencer and a police radio.

The men were charged under previously unused state terrorism statute passed after September 11, with charges that included second-degree conspiracy as a crime of terrorism, second-degree conspiracy as a hate crime and second-degree criminal possession of a weapon as a crime of terrorism.

Unlike most terrorism cases, the investigation was carried out by the NYPD alone. WNYC reported that the FBI declined to take the case due to doubts surrounding the undercover investigation.

Ferhani and Mamdouh avoided the higher-level terror conspiracy charge when a grand jury declined to indict them, but they were then indicted on other terror and hate crime charges. They face up to 32 years in prison if convicted.

It was those charges Ferhani's attorneys hoped to see dismissed on Monday.

Obus said in his written ruling: "The overt acts alleged in support of the conspiracy charges – and again, reflected in the evidence before the grand jury – assert (Ferhani's) very tangible plans to use the weapons in a religiously-motivated fashion against Jews and other non-Muslims."

According to his defense team, Ferhani has been institutionalized for psychiatric problems as many as 30 times – at least five of them after his family called police. Deek said Ferhani has never been properly diagnosed but is believed to be bi-polar, engages in self-mutilation, has attempted suicide and was sexually abused as a child. Deek claims Ferhani was previously treated for psychological issues by the department of corrections after being instituitonalized by the NYPD.

"They knew that he was mentally infirm. They've known that since he was 17," Deek said. "He was an easy target."

In the years following September 11, law enforcement has relied heavily on the use of undercover officers and informants to build cases against terrorism suspects, raising concerns of entrapment among legal experts. To date, not one such defense has been successful since the attacks.

New York City police spokesman Paul Browne said in email: "The judge's ruling is not surprising. Entrapment is a familiar, unconvincing defense. The fact remains that the NYPD disrupted a plan to kill Jewish New Yorkers."

Leonard Levit, a veteran NYPD reporter and author of the book NYPD Confidential, says the Ferhani case reflects a pattern. Curbing potential entrapment, Levitt says, requires law enforcement transparency, particularly in the case of the NYPD.

"The only thing that's going to stop all this nonsense is just public disclosure about what they do," he said. "They seem to be preying on vulnerable people."