El Khalifi was arrested in an FBI sting last February after authorities said he donned a suicide vest and accepted an automatic weapon in a parking garage near the Capitol complex. The vest and the gun had been rendered inoperable by law enforcement.

"This case is the first suicide bomber in America," said Assistant U.S. Attorney Gordon Kromberg in arguing for the higher sentence to send a message. "We cannot wait until there are real dead victims."

Just Watched

Suicide bomb suspect arrested

Kromberg also referred to the attack on Tuesday by armed militants on the U.S. Consulate in Benghazi, Libya, that killed Ambassador Chris Stevens and three other Americans on the anniversary of the al Qaeda attacks of September 11, 2001.

"We just had an ambassador killed in Libya," said Kromberg. "These things can't be tolerated."

El Khalifi's lawyer, Kenneth Troccoli, argued his client should get the lower range of the sentence.

"His motive was to do what he thought God had told him to do," Troccoli said.

El Khalifi has no ill will toward Americans and was relieved his plot was thwarted and no one was injured, Troccoli said, adding that his client admitted culpability to a serious offense but was "enabled" in the plot by two men who he didn't know were working for the FBI.

Kromberg stressed at the sentencing hearing that El Khalifi was driving the plot and was not pushed into it by undercover officers.

But Troccoli said the undercover agents offered to send martyrdom payments to El Khalifi's parents in Morocco and also paid off his debts. El Khalifi's religion would not allow him to give up his life while in debt or leave his family in financial trouble, Troccoli said.

The attorney also described his client as a young man who came to the United States at 16 as a visitor and liked it so much he stayed. El Khalifi overstayed his visa and was in the country illegally at the time of his arrest.

Troccoli said El Khalifi's main interest was in mixing music but that led him to a lifestyle that included spending time in night clubs and using drugs. At his mother's urging, El Khalifi became more religious and started regularly attending a mosque and reading the Quran, the attorney said.

According toTroccoli, his client thought his religion required him to mount his attack but it didn't matter if it was successful.

"He has no desire to ever do this again," said Troccoli.

But U.S. District Judge James Cacheris asked: "What if God tells him to do this again when he gets out?"

Troccoli said El Khalifi believed he had "satisfied his faith" and also noted the plea agreement called for his client to be deported to Morroco after he serves his time.

Cacheris nevertheless imposed the maximum sentence under the plea agreement.

According to a statement of facts in the case, El Khalifi changed his mind about what to target and at various times considered a restaurant, a military installation and a synagogue.

He eventually decided to try to blow himself up in the Capitol, according to the court document, and said "he would be happy killing 30 people."

El Khalifi admitted performing surveillance at the Capitol and asking an associate, who was secretly part of the FBI sting, to remotely detonate the bomb if he ran into problems with security.