BOSTON – A Massachusetts man was arrested Wednesday and accused of plotting an assault on the Pentagon and U.S. Capitol using remote-controlled aircraft armed with explosives — the latest of several terrorism cases to spring from federal sting operations.

Rezwan Ferdaus was arrested in Framingham after undercover federal agents delivered materials he had allegedly requested, including grenades, six machine guns and what he believed was 24 pounds of C-4 explosive. Federal officials said the public was never in danger from the explosives, which it said were always under control and closely monitored.

Wednesday’s arrest was similar to other cases in which would-be terrorists were caught in sting operations that revolved around fictional plots against various targets, such as Dallas skyscapers or a Chicago nightclub. In this case, though, authorities allege Ferdaus planned the scheme.

According to a federal affidavit, Ferdaus, 26, of Ashland became convinced that America was evil through jihadi websites and videos and began planning “jihad” against the U.S. in early 2010. He contacted a federal informant that December and months later, allegedly began meeting to discuss the plot with undercover federal agents he believed were members of al-Qaida.

Ferdaus said he wanted to deal a psychological blow to the “enemies of Allah” by hitting the Pentagon, which he called “head and heart of the snake,” according to the affidavit.

“Allah has given us the privilege,” he allegedly told the informant. “He punishes them by our hand. We’re the ones.”

Ferdaus, a U.S. citizen who graduated from Northeastern University, made a brief initial appearance Wednesday in federal court on charges of attempting to destroy federal buildings and providing support to a foreign terrorist organization, in this case al-Qaida. A detention hearing was scheduled for Monday.

Messages were left at the office of his attorney, Catherine Byrne, and at the address listed for Ferdaus in the affidavit.

Several alleged domestic plots have been thwarted since the Sept. 11, 2001, terrorist attacks, including in Lackawanna, N.Y.; Portland, Ore.; and Virginia.

Terrorism arrests involving federal stings have often beenfollowed by claims of entrapment, but none of the cases brought since Sept. 11 has been thrown out on such grounds.

At one point, according to recorded conversation detailed in the affidavit, Ferdaus told undercover agents that his desire to attack the United States was so strong, “I just can’t stop. There is no other choice for me.”

According to the affidavit, Ferdaus traveled to Washington, D.C., in June to do surveillance, and drew up a 15-phase attack plan. He also allegedly rented storage space to work on the planes in Framingham, telling the manager he planned to use the space for music.

Asked at one point about possibly killing women and children, Ferdaus allegedly said all unbelievers of Islam were his enemies.