But there was a problem: The explosives were inert, the gun inoperable and the man who provided them was an undercover officer -- not, as he thought, an al-Qaida associate, according to court documents.
El Khalifi was arrested in a parking garage Friday on his way to carry out an attack the FBI says had been kicked around for months -- in apartments, inside a restaurant and at a quarry used for bomb practice -- with shifting targets in mind.
Court papers unsealed Friday trace the evolution from a vague plan to prepare for the "war on Muslims" to more clearly articulated visions of attacking a restaurant and a synagogue before, finally, settling on a plot to obliterate the seat of American government. The documents allege a weeks-long flurry of final activity by El Khalifi, monitored by the FBI and coordinated through an undercover agent, to scope out the building, train in explosives and arm himself for a suicide attack.
As El Khalifi, 29, made a court appearance Friday on a terrorism-related charge, the FBI executed search warrants inside a gated residential community in Alexandria and at a red-brick rambler in Arlington, though it wasn't immediately known what they found. El Khalifi is scheduled to have a bond hearing Wednesday. A public defender who was present for El Khalifi's initial appearance didn't return a phone message Saturday.
Authorities haven't described how they believe El Khalifi became intent on destruction and have released rudimentary biographical details.
He was born in Morocco and came to the United States in 1999, when he was 16, overstaying his visitor visa and remaining in the country illegally, court papers say. He is unemployed and is not believed to be associated with al-Qaida.
He aroused the suspicion in 2010 of a former landlord, Frank Dynda, who rented him a one-bedroom apartment inside a brick building in Arlington across the street from a park. He evicted him that year for not paying rent. He said El Khalifi moved in with a woman whose name was the only one on the lease. Dynda recalled the woman as Bulgarian and said he was under the impression they were married. She had a job, but El Khalifi appeared not to have rent money.
"She looked good on paper. He looked terrible on paper," Dynda said.
Dynda said El Khalifi periodically received heavy boxes stamped with the word "Books" from Baltimore and advertised his apartment as some sort of luggage business, though Dynda said he never saw any luggage there. The woman moved out, and two or three other men resembling El Khalifi began staying there, Dynda said. The rent checks stopped coming.
Dynda confronted El Khalifi for being a squatter, but he said El Khalifi told him he had a right to be there and threatened to beat him up. Dynda called police, but he said officers told him to treat El Khalifi like a legal tenant. He moved out that summer.
"He was going to harm me, and I think I'm very lucky to be alive today," Dynda said.
The investigation that led to El Khalifi's arrest started last January on a confidential informant's tip to the FBI. The informant described a meeting inside an Arlington apartment, where a person who produced an AK-47, two revolvers and ammunition urged the group to prepare for the "war on Muslims." El Khalifi, the FBI learned, expressed agreement.
By December, the sting operation -- and, authorities say, El Khalifi's own plans -- were taking shape.
That month, he traveled to Baltimore with a man he knew as Hussien to meet a person named Yusuf whom he thought was an al-Qaida associate, authorities say. He told Yusuf he planned to blow up a building just outside Washington in Alexandria, Va., that housed military offices. Handling the man's AK-47, he spoke of wanting to "use a gun and kill people face to face," according to the complaint.
Unbeknownst to El Khalifi, the man who called himself Yusuf was an undercover law enforcement officer.
As the meetings continued, the plans evolved.
El Khalifi spoke in December of wanting to attack a synagogue and Army generals. But within days, he was he settling on a new plan to bomb a Washington restaurant at lunchtime after a waiter told him that was the busiest time, the complaint says. On Jan. 8, in preparation for the restaurant attack and a planned al-Qaida attack on a military installation, authorities say he bought two jackets and a cell phone. He agreed to buy more phones, nails and glue to use in bomb-making and said he would he happy killing 30 people, authorities say.
He cautioned Hussien not to question him on his desire.
He changed his mind a week later, saying he wanted to blow himself up inside the Capitol on Feb. 17 as an act of martyrdom, prosecutors say. He went on something of a test run that same day, using a cell phone to successfully detonate a test bomb at a West Virginia quarry. But instead of being satisfied with the explosion, the FBI says, he said he wanted a bigger bomb.
Court papers show the last two weeks were consumed with the planned attack on the Capitol as a seemingly emboldened El Khalifi selected a location where he'd be dropped off. He asked that even more explosives be strapped to his body. He wanted to make sure the bomb in his vest could be remotely detonated in case he faced security problems, authorities say.
Final planning occurred in an Alexandria hotel room on Valentine's Day, when authorities say the undercover officer handed El Khalifi an automatic machine gun and showed him a jacket the suspect thought contained a bomb. El Khalifi studied himself in the mirror with the weapon. He practiced shooting it. He discussed how he'd be identified in a video al-Qaida would release after the attack, according to court papers.
On Friday, a sunny and unseasonably warm winter day, El Khalifi got into a van in northern Virginia with Yusuf and Hussien. The gun and vest he had asked for were inside, authorities say. The van pulled into a parking garage near the Capitol. El Khalifi got out alone. Before he could leave the garage, he was arrested.