A man convicted in 2010 of plotting to blow up synagogues and a Jewish community center in New York as well as shoot down military aircraft will be freed after a retrial judge ruled he was framed by the FBI.

The Newburgh Four, as the group led by James Cromitty became known, were involved in a 2009 plot to blow up synagogues and a community center and shoot down a military aircraft with stinger missiles. Judge Colleen McMahon said they were set up by overzealous FBI agents working with an “unethical” federal police informant.

McMahon had already ordered the release of the other three, Oda Williams, David Williams and Lagera Payen, last July. On Friday he also ordered the release of the fourth, James Cromitty. The judge called the case “notorious” while saying the four were “unfortunate” petty criminals caught by the government.

In 2010, all four were sentenced to 25 years in prison for terrorism. The judge did not overturn Cromitty’s conviction but reduced his sentence to the time he has already served in jail, plus 90 days.

McMahon explained that Cromitty was a “fraudster”, penniless and unemployed at the time he was recruited into the FBI scheme and given to planting fake bombs, with the promise of receiving $250,000 for this “jihadist mission”. Cromitty found the other three who would be his “cheers” on this “mission”.

“The three men were recruited so that Cromitty could conspire with someone. The real conspirator was the US (…) The FBI concocted the plot, chose the targets, manufactured the munitions,” McMahon said.

Cromitty was recruited by an FBI informant, Shahid Hussain, whom the judge called a “criminal.” His role was to infiltrate mosques and identify people who could be extremists. It was Hussain who offered “heavenly and earthly rewards” such as $250,000 to Cromitty “to plan, participate and find accomplices” in an alleged jihadist attack, according to the judge.