Prosecutors said Ferdaus also sought to impress the men he thought were recruiters by giving them 12 cellphones rigged to act as switches for an improvised explosive device. He allegedly appeared gratified when he was told that one of the detonation devices succeeded in killing three US soldiers and injuring at least four others, exclaiming, “That’s exactly what I wanted,’’ according to the indictment.

Prosecutors say Ferdaus delivered detailed plans of the attack in the spring to two FBI agents who were posing as Al Qaeda recruiters, and he asked for their help in acquiring the planes, C-4 explosives, and AK-47 assault rifles. He acquired one plane in August. The agents delivered the guns and 25 pounds of explosives Wednesday to Ferdaus, who put them in a storage unit he had rented in Framingham. Once he closed the doors to the unit, the agents arrested him.

“Once we cut off the military, we can take care of the politicians,’’ he allegedly told undercover agents.

Prosecutors say that Ferdaus, 26, a US citizen who holds a physics degree from Northeastern University, had hatched a plan to launch three explosive-laden, remote-controlled planes, each the size of an adult’s body, into the Pentagon and the US Capitol “to kill as many people as possible.’’ He allegedly planned to launch them from East Potomac Park, and a six-man team would then shoot at anyone fleeing the buildings.

The account of Ferdaus’s extreme views came as he was indicted yesterday in federal court on charges of attempting to damage and destroy a federal building by means of an explosive, attempting to damage and destroy national defense premises, receiving firearms and explosive materials, and attempting to provide material support to terrorists and terrorist organizations. He faces life in prison and is slated to appear Monday in US District Court in Worcester.

“We said, ‘Look, that’s not going to work here,’ ’’ said Atif Harden, director of institutional advancement at the Islamic Society of Boston Cultural Center. “I can’t think of a mosque where he was welcome. He was clearly way out of step with the rest of the Muslim community . . . very disaffected, very disturbed. Just a bitter, angry guy.’’

Rezwan Ferdaus was said to revere the terrorist organization, and he criticized the mosque’s participation in interfaith efforts and in politics. He also disapproved of the mosque’s liberal policies that allowed men and women to eat and drink together in its cafe and was hostile toward women he thought dressed inappropriately or who had conversations with men, the official said.

The Ashland man who allegedly plotted to fly explosive-laden, remote-controlled airplanes into federal buildings in Washington, D.C., was asked to leave a Roxbury mosque last year because of his radical Islamic views and suspected support of Al Qaeda, a mosque official said yesterday.

This story was reported by Travis Andersen, Mark Arsenault, Brian Ballou, and Milton J. Valencia of the Globe staff. It was written by Valencia.

Ferdaus said he was inspired by Al Qaeda and its teachings by watching videos and reading websites, and he realized how evil America had become. He spoke ardently of the psychological blow his plan would have on the American psyche.

He wanted to, in his words, “change the world,’’ according to an FBI affidavit filed in federal court.

Terrorism and national security specialists said that Ferdaus represents a growing security concern in the United States about young American Muslims being radicalized by Al Qaeda propaganda, who then work on their own to carry out attacks. That includes plans to bomb skyscrapers in Dallas, Denver, and Chicago, to attack the New York subway system, as well as the Fort Hood attacks two years ago.

“The link we’re seeing between these attacks is the ideology, an ideology that says it’s OK to use extreme acts of terrorism to support that ideology,’’ said Dana Janbek, a former research associate at the Middle East Institute who has taught and written extensively about terrorism and national security.

“These websites provide information that has an extreme and inaccurate interpretation of Islam and frames the US as an enemy of Islam, and in doing so makes it OK for them to attack US targets.’’

James Forest, a professor of national security and terrorism studies at the University of Massachusetts Lowell, added that Ferdaus appears to have crossed the line from being someone who talked about attacks to someone who was actively working to carry them out, and who had the smarts - and eventually the help of what he thought were Qaeda accomplices - to do so.

“When you show signs of going operational, by committing resources, carrying out a plot, that would be the trigger switch to attempt to thwart that effort,’’ Forest said. “It’s dangerous knowledge. He’s now putting himself in a position to kill people.’’

Questions remain, Forest and Janbek said, about when and how Ferdaus started to turn radical.

Ferdaus’s arrest alarmed some in his hometown of Ashland, a suburb west of Boston where he lived with his parents and a younger brother in a sprawling home. He was described as the type to keep to himself, though he played drums in local bands. He quoted Gandhi and promoted peace in his yearbook, where he listed one goal: “Enlightenment.’’

“This is the sleepy little town of Ashland, and you don’t know that this type of thing is going on, so you know everybody is a little concerned about it,’’ said Selectman Jon Fetherston, who lives in Ferdaus’s neighborhood.

In high school, Ferdaus and two classmates were convicted of vandalism for pouring cement in front of doors, though they denied accusations that they burned an American flag.

Ferdaus graduated with a physics degree from Northeastern in 2008. There, he was the musician everybody called Rez, who dressed like a grungy beatnik, professed a do-it-your-own-way philosophy, and avoided conflict and confrontation, said a former college friend.

He was eccentric but “never said anything violent or destructive in any way,’’ said Steven Gumeny, who met Ferdaus in their freshman year. “It was always more of a peace and love vibe that his group had going.’’

Still, Ferdaus held strong opinions and liked to point out society’s flaws. “Things like, ‘You don’t have to do things the way society wants you to do,’ would be something he stood for, I think,’’ Gumeny said.

In college, Ferdaus was the drummer in a Latin/funk dance band, Goosepimp Orchestra. A cached version of the band’s Web page says that Ferdaus, nicknamed Bollywood, was the original drummer in 2004.

But, the page states, “Rezwan then moved on to become a devout spiritual practitioner.’’

According to prosecutors, his beliefs at some point turned radical. He allegedly began to describe himself as a jihadist, or “amir,’’ the Arabic term meaning leader, and he called for the death of any “kafir,’’ the Arabic term for nonbeliever.

Ricardo Maestre, 27, of Hyde Park, who started attending the Roxbury mosque earlier this year said Ferdaus had made a reputation for himself there.

“I just heard he would really be disrespectful to the sisters who go here and say really stupid things, talk about jihad,’’ Maestre said.

Maestre said it is important for Muslims to speak out against extremist elements in the faith.

“Some Muslims are afraid to speak out against that,’’ he said. “They’re afraid to speak out . . . but I’m not.’’

Milton J. Valencia can be reached at mvalencia@globe.com. Follow him on Twitter @miltonvalencia.

© Copyright 2011 Globe Newspaper Company.