Image copyright AP Image caption Prosecutors said Jose Pimentel ran a militant website before he began making bombs

A New York man who authorities say planned a campaign of terrorist attacks has pleaded guilty to avoid life in prison, his lawyers have said.

Jose Pimentel, 29, will be sentenced to 16 years in prison under the plea deal.

Prosecutors said Pimentel, a Dominican immigrant raised in the US who converted to Islam in 2004, began building pipe bombs in 2011.

His lawyers have argued the case is an example of overzealous policing since the 9/11 attacks on New York.

They have suggested their client never would have progressed from posting messages on militant web sites to actually constructing pipe bombs had police not sent undercover agents to engage him and goad him on.

'Home-grown threat'

Media playback is unsupported on your device Media caption Then New York Mayor Bloomberg described the alleged plot in 2011

Pimentel maintained a website with articles praising Osama bin Laden and describing victims of the 11 September 2001 terrorist attacks as legitimate targets, prosecutors said in legal filings.

But he "crossed the line from violent rhetoric on his Internet sites to building pipe bombs to be used against our citizens", Manhattan District Attorney Cyrus Vance Jr said at the time of his arrest.

Pimentel was recorded by an informant discussing assassinating a judge, killing returning soldiers and bombing a police station or the George Washington Bridge.

He was arrested in November 2011 as he assembled bombs from clocks, Christmas tree lights, match-head scrapings and other items, prosecutors said.

Officials have called Pimentel, originally from the Dominican Republic, an example of the growing threat of US home-grown terrorism, saying he found instructions on pipe bomb construction from al-Qaeda's Inspire magazine.

'Who recruits whom?'

On Wednesday, he pleaded guilty to the charge of attempted criminal possession of a weapon as a crime of terrorism.

While Pimentel admitted his guilt, his lawyer Susan Walsh said outside the court, "The question that will not be answered, at least not in a court of law, is who exactly is recruiting whom in this war, this so-called war on terror."

The New York man was charged under a rarely-used state law. Almost all cases of suspected terrorism in the US are handled by the FBI and result in federal charges.

After his arrest, two anonymous law enforcement officials said the FBI had declined to participate in his case because the agents felt Pimentel was not inclined or able to act without an informant's involvement, the Associated Press news agency reported.

Former New York City Police Commissioner Raymond Kelly said at the time the FBI was aware of the local investigation but circumstances compelled officials to act fast and use state charges.