Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — A federal court jury here found a Libyan man guilty on Tuesday of playing a role in the infamous terrorist attack on a U.S. government compound in Benghazi, Libya. But he was acquitted of charges that his actions lead to the deaths of four Americans.

Five years after the Sept. 11, 2012, raid that killed a U.S. ambassador, Ahmed Abu Khatallah was found guilty of helping to plan and carry it out. It is the first conviction to stem from the deadly attack.

Ahmed Abu Khatallah arraigned before U.S Dist. judge Christopher R Cooper in Washington, DC on Oct. 20, 2014. Art Lien file

Prosecutors said Khatallah was among 20 people who stormed the U.S. mission with machine guns and grenade launchers, set it on fire and later attacked an annex, killing Ambassador Chris Stevens and three other Americans — Glen Doherty, Sean Smith, and Tyrone Woods.

But in a big setback to prosecutors, the jury found Khatallah not guilty on charges that his actions led to the deaths of the Americans.

Of 18 counts in the federal indictment, he was convicted of four: destroying U.S. government property, discharging a firearm during a violent crime, and two counts of providing support to a terror organization.

"Today, a small measure of justice was meted out," CIA Director Mike Pompeo said in a statement to staff.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

"A federal jury convicted Ahmed Abu Khatallah for the terror he inflicted upon the patriotic men and women — from the State Department and CIA — in Benghazi, Libya, on the night of September 11, 2012," Pompeo said. "It took intelligence to find him, soldiers to assist in capturing him, law enforcement to interview him, and a legal team to put him away."

"Khatallah’s sentencing is to follow; but no term in prison will bring our people back. We lost two of our own that night — Glen Doherty and Tyrone Woods — who ran to the sound of the guns and bravely fought to protect Americans and the two U.S. facilities that were attacked," he added. "Also murdered were Ambassador J. Christopher Stevens and Sean Smith — remarkable diplomats who volunteered to serve our nation in a dangerous place.”

Related: Second Benghazi suspect appears in court

Tipped off by a local informant, a team of U.S. special forces and FBI agents snatched Khatallah from a seaside villa in Libya three years ago and interrogated him aboard a Navy ship that slowly made its way to to the United States.

John Carlin, a former national security official, said it's remarkable that he was ever brought here in the first place.

"I bet he thought he was completely safe and wasn't looking over his shoulder — to have some Americans show up and bring him back to face justice," Carlin said.

Defense lawyers had argued that Khatallah was initially denied his rights to an attorney, deprived of a speedy appearance before a judge and was questioned under coercion. But U.S. District Judge Christopher Cooper, after holding several hearings on the capture and interrogation, ruled that the statements made to the FBI on the ship could be admitted at trial.

The Libyan informant, who collected a $7 million reward, testified during the trial that Khatallah planned the attack for more than a year.

Related:Benghazi suspect Ahmed Abu Khatallah ordered held without bail

The Benghazi issue dogged Hillary Clinton during the presidential campaign. Donald Trump frequently raised it during public appearances. "Instead of taking charge that night, she decided to go home and sleep. Incredible," he said.

Though the trial shed new light on the attack, it did not deal with the U.S. response.

The Obama administration decided not to seek the death penalty in the case, so when Khatallah is sentenced, at a later date, he'll likely get several years in prison.

Meanwhile, another man, Mustafa al-Imam, also snatched from Libya by the U.S., will soon face trial on charges that he also took part in the attack.