The term imposed on 29-year-old Amine El-Khalifi of Alexandria was the highest allowed under a plea deal.
Mr. El-Khalifi admitted plotting the attack with undercover agents he believed were from al Qaeda and volunteering to run a suicide operation at the Capitol, going so far as to don what he thought was a bomb-laden vest.
At Friday’s hearing, Mr. El-Khalifi expressed no remorse and said only that he loves Allah.
Defense lawyers said the sting operation preyed on Mr. El-Khalifi’s financial woes by giving him nearly $6,000.
Prosecutors said Mr. El-Khalifi came to authorities’ attention in part by answering a Facebook post seeking to recruit Muslim holy warriors.