The FBI arrested a man suspected of planning to carry out a suicide attack against the U.S. Capitol on Friday. But the would-be suicide bomber, identified as a Moroccan national who resided in Alexandria, Virginia, was the target of a lengthy FBI undercover investigation and the public was never in any danger, FBI and Justice Department officials stressed.

The man, identified as Amine El Khalifi, 29, was charged Friday by criminal complaint with attempting to use a weapon of mass destruction against U.S. property, according to the Justice Department. If convicted, he could receive a maximum sentence of life in prison...