WORCESTER (AP) — A federal judge has denied bail for a Massachusetts man accused of plotting to fly remote-controlled model planes packed with explosives into the Pentagon and the U.S. Capitol.

The judge said in the decision issued Monday that 26-year-old Rezwan Ferdaus is a “danger to the community” with a “dedication to his cause.”

READ MORE: Police Searching Woods In Abington For Missing 5-Year-Old Elijah Lewis

Ferdaus, a Muslim American with a physics degree from Northeastern University, was arrested in Framingham in September after federal employees posing as al-Qaida members delivered what he believed was 24 pounds of C-4 explosives.

Lawyers for the Ashland man said Ferdaus has mental health issues and had a “completely unrealistic fantasy.”

READ MORE: 'Plan For Alternatives': Toys May Be In Short Supply This Holiday Season

They wanted Ferdaus released on bail and placed in the custody of his father while awaiting trial.

Prosecutors said Ferdaus’ anger at the U.S. warranted detention.

MORE NEWS: Lauren Astley's Father Works With Wayland Students To Raise Awareness About Teen Dating Violence

Copyright 2011 The Associated Press.