Four men accused of placing what they thought were bombs outside two synagogues in the Bronx and planning to shoot a missile at planes will not be released on bail, even though the government’s case against them may be weaker than initially thought, a federal judge ruled on Friday.

The men — James Cromitie, 44, Onta Williams, 32, David Williams IV, 28, and Laguerre Payen, 27 — have been jailed for more than a year on terrorism charges.

They have pleaded not guilty, saying they were entrapped by a federal informant who proposed and directed the plot and then supplied the fake bombs and an inactive missile.

Mr. Payen is illegally in the country from Haiti and not eligible for release. The judge, Colleen McMahon, denied the others bail because, she ruled, there was no assurance they would return for trial if freed.

But the judge also noted in her ruling that “the government’s case may not be as ironclad as it appeared in the hours and days immediately after the defendants were arrested.”

Defense lawyers had no comment. They argued at a hearing on Monday that their clients were not dangerous and could be released.

The men are accused of placing what they thought were bombs outside two synagogues in May 2009 and of planning to use what they thought was a live Stinger missile against planes at the Stewart Air National Guard base near Newburgh, N.Y., where they lived.