NEW YORK — The government's star witness against four men charged with trying to blow up New York synagogues and shoot down military planes told a jury on Friday that he too was busted in a sting operation before becoming a paid FBI informant.

Shaheed Hussain was arrested in 2003 after an informant convinced him to get him a phony driver's license. As part of a plea deal, Hussain agreed to pose as an arms dealer in a sting at an Albany, N.Y., mosque.

Under early questioning about his background in federal court in Manhattan, Hussain testified that in his undercover role in Albany he "did money laundering" with an imam and a worshipper. The pair were convicted in 2007 of conspiring to support terrorism.

Hussain, a 53-year-old Pakistani immigrant, was paid nearly $100,000 for his next assignment: to root out radicals at another mosque in Newburgh, a city north of New York.

His work resulted in the arrests of alleged mastermind James Cromitie, 44, and three men recruited as lookouts — Onta Williams, 34; David Williams, 29; and Laguerre Payen, 28 — on charges of conspiracy to use weapons of mass destruction and conspiracy to acquire and use anti-aircraft missiles to kill U.S. officers and employees.

Prosecutors say Hussain met Cromitie at the mosque in June 2008 while posing as a wealthy representative of a Pakistani terrorist organization.

The government alleges Cromitie — with Hussain playing "terrorist facilitator" — eventually hatched a plot involving the other men to blow up two synagogues in the Bronx with remote-control bombs. They also wanted to use surface-to-air missiles to shoot down planes at the Air National Guard base in Newburgh.

The men obtained what they thought were explosives and a missile system, but were actually inert devices supplied by the FBI. They were arrested on May 20, 2009, when they went to the synagogues to plant the fake bombs.

Wearing a wire, Hussain helped the FBI make hundreds of hours of video and audio tapes of the defendants picking targets for jihad and ranting against Jews, prosecutors said in their opening statement.

"I hate those Jewish bastards," a prosecutor quoted Cromitie as saying. "I would like to get a synagogue for me personally."

In his opening statement, defense attorney Vincent Briccetti labeled Hussain "a master manipulator" who offered large sums of money and even a BMW to men who were uneducated and mostly unmotivated. He entrapped the men in "a phony plot that he certainly would not have joined otherwise," Briccetti said.

Hussain is expected to spend several days on the witness stand.