NEW YORK — Three men arrested in a sting operation for planning to attack two New York synagogues and to shoot down US military planes were each sentenced Wednesday to 25 years in prison.

The three -- James Cromitie, 45, David Williams, 30 and Onta Williams, 35 -- were arrested on May 20, 2009 following a year-long operation that included an undercover informant who provided inert explosives.

They were convicted in October 2010 after a two-month trial.

US Attorney Preet Bharara said the three "voluntarily agreed to target synagogues and military planes using what they thought were real bombs and missiles... Today's sentences ensure that the defendants will be punished for their actions."

According to the US attorney's office, an FBI informant was approached in June 2008 by Cromitie, who talked to him about Afghanistan.

Cromitie told the informant his parents had lived in Afghanistan, and said that if he died a martyr, he would go to "paradise."

The informant told Cromitie that he was involved with a Pakistan-based foreign terrorist group known as Jaish-e-Mohammed, and Cromitie said he would like to join the group to "do jihad."

The informant continued to meet with Cromitie, the two other defendants and a fourth defendant, Laguerre Payen, who has not yet been sentenced.

The group discussed attacking synagogues in the Riverdale section of the Bronx, in New York city, and shooting down military aircraft from the Air National Guard Base in Newburgh, New York.

The informant provided the men with a non-functioning surface-to-air guided missile and three IEDs (improvised explosive devices), each with 30 pounds of inert C-4 plastic explosives.

The men were arrested as they took "active steps to carry out the operation," the US attorney's office said in its statement.

Assistant US Attorney David Raskin, responding to defense attorney arguments of entrapment, argued that the sting operation did not undermine the seriousness of the men's crimes.

"They still had a chance to pull out," he said. "The bombs that they were going to use were supposed to kill a lot of people. The fact that is all fake really doesn't matter."