WASHINGTON (CNN) -- U.S. Capitol Police and the FBI on Friday arrested a Moroccan man who was planning a suicide attack on the Capitol, police and a federal law enforcement official said.
Authorities identified the man as Amine Khalifi.
He received what he thought was a vest with explosives, but the materials in the vest had been rendered inoperable by law enforcement, Justice Department spokesman Dean Boyd said.
The man was arrested as soon as he accepted the vest from undercover officers, according to the federal law enforcement source.
Khalifi was also given a gun, which was similarly rendered inoperable, the official said.
The 29-year-old suspect was living in Alexandria, Virginia, and was in the United States illegally, the source said.
The man had been closely monitored as part of a lengthy and extensive undercover operation, police said, adding that U.S. Capitol Police had been "intimately" involved in the investigation.
The public was never in danger, police said.
The official said the person is not connected to a terrorist organization and was acting alone. He came to the attention of law enforcement because of his extremist views, the source said.
Khalifi thought he had met al Qaeda members who would assist him, but in fact he was dealing with undercover FBI agents, said the official. The source declined to say whether the FBI has audio or video recordings of the suspect talking to undercover agents about his plans.
In September last year, a federal grand jury indicted a man for allegedly plotting to use large remote-controlled model airplanes filled with explosives to attack the Capitol and the Pentagon.
A man was arrested in September 2008 two blocks from the Capitol after an officer spotted a rifle in his car.
And in July 1998, a gunman fired shots in the Capitol building, killing two U.S. Capitol Police officers.
CNN's Susan Candiotti contributed to this report.