As it turned out, undercover agents had been monitoring Amine El Khalifi for about a year, and had armed him with a suicide vest full of harmless, inert materials.
According to the FBI, El Khalifi wanted to kill as many tourists and government employees as he could.
The Justice Department said he entered a parking garage two blocks from the Capitol Friday morning and strapped on what he thought was an explosive vest provided by al-Qaeda.
Meanwhile, agents stood by ready to make the arrest.
Investigators said El Khalifi is an illegal immigrant from Morocco, who plotted the attack in an Alexandria, Va., home for months. He thought he was working with an al-Qaeda operative named "Hussein."
According to the criminal affidavit, El Khalifi agreed that the "war on terrorism" is a "war on Muslims."
In January, he set off a test bomb in a West Virginia quarry.
Friday, he planned on using a gun during the attack to shoot officers trying to stop him. However, officers stopped him first.
Late Friday, El Khalifi arrived for his initial appearance in a Virginia courtroom. If convicted, he faces a maximum penalty of life in prison.