Washington (CNN) A Libyan man who acted as a scout for the Islamist militia that stormed the US consulate in Benghazi in 2012 was sentenced to 19 and a half years in prison Thursday by a federal judge in Washington.

Mustafa al-Imam was convicted last summer of destroying property at the US diplomatic compound in the Libyan city and conspiring to support terrorists, but he escaped more severe punishment when a jury was unable to reach a verdict on more than a dozen other counts, including murder charges related to the deaths of US Ambassador Christopher Stevens and three other Americans.

Judge Christopher Cooper, who delivered the sentence, said al-Imam was not simply "guilty by association" but had likely acted as the "eyes and ears" of the attack's mastermind that night.

Cooper also evoked the separate siege of the US Embassy in Baghdad late last year, noting that he was punishing al-Imam in part to deter other would-be attackers from targeting US diplomats and service members abroad.

"Those folks are very exposed and very vulnerable targets, as recent events have shown," Cooper said. "Anyone contemplating harming them needs to know they will face serious consequences."

The sentencing marks one of the final acts in the years-long fallout from the Benghazi attack, which spurred several investigations and sparked a political firestorm. The hearing room was at one point lined with family members of the attack's victims, as well as personnel from the State Department and CIA who had responded to it.

Al-Imam, a slight 47-year-old who wore an orange jail uniform, did not noticeably react when the sentence was handed down.

After the hearing, Barbara Doherty, the mother of a CIA contractor who was killed in the attack, Glen Doherty, hugged the lead Justice Department prosecutor and told him, "Thank you for all your hard work."

Doherty told CNN that she was "pleased" with the sentence.

An attorney for al-Imam, Matthew Peed, said he planned to appeal the sentence. "We're disappointed by the sentence. It was based on conclusions that the jury did not find," Peed said.

While prosecutors had sought the maximum sentence of 35 years in prison for al-Imam, the Libyan's defense team had argued that 41 months -- a little over three years -- would be fair.

In court documents, al-Imam's lawyers described him as a "frail, uneducated, and simple man" who made a "tremendous mistake."

"He is not a fighter, an ideologue, or a terrorist. He is a former convenience store clerk whose main loves in life are soccer and family," they wrote in a sentencing memo submitted earlier this month.

Role in the attack

Al-Imam was described as a "scout" for the militia on the night that it burned and ransacked the US diplomatic mission and a CIA building. He arrived as the attack was ongoing, in a convoy alongside Ahmed Abu Khatallah, the militia's leader and the accused ringleader of the attack.

Using phone records, prosecutors had shown that al-Imam had spoken throughout the evening with Abu Khatallah as the attack progressed. Prosecutors had also alleged that al-Imam handled a map stolen from the wrecked mission, suggesting that he may have helped militia members locate the nearby CIA annex, where more Americans were later killed.

Prosecutors also showed surveillance video from the area on the night of the attack as they argued that al-Imam would have known that he was walking into a battle that could result in the deaths of Americans.

"That's not an errand boy, that is somebody who's a member of a militia," said John Cummings, the prosecutor.

The attack on the mission was "designed to maximize pain and humiliation" for America, Cummings said, adding that a stiff sentence was necessary to deter future terrorists' plans.

In sentencing Abu Khattalah in 2018, Cooper also disappointed the government with a lower sentence than prosecutors had requested. Abu Khattalah is serving a 22-year sentence, after a jury acquitted him of murder and attempted murder charges. He was convicted on four charges, including conspiracy and providing support to terrorists.

In a statement before the court on Thursday, Greg Doherty, the brother of CIA contractor Glen Doherty, had urged Cooper to impose the maximum 35-year sentence on al-Imam, calling Cooper's decision in the Abu Khattalah case a "travesty to the process" that "deflates our standing abroad."

"I do feel compassion as I sense that you do for the defendant," Doherty said. "I'm sad that he made the choices that he did. However those are important life and death decisions that he made and the consequences matter for our family and the nation."

In their arguments, al-Imam's attorneys had emphasized the context in Libya: The attack took place in a country that had gone through a bloody revolution and where splintered militias were thriving.

Al-Imam, they argued, was not an inner-circle operative of Khatallah's but rather a friend who had sought protection from an important local leader in a time of dangerous uncertainty.