New York (CNN) -- A federal judge sentenced Ahmed Khalfan Ghailani to life without parole on Tuesday for his role in the 1998 bombings of two U.S. embassies in East Africa, which left 224 people dead and thousands wounded.
He is the first Guantanamo detainee tried in U.S. civilian court, having been convicted by a federal jury in November on a single conspiracy charge to destroy buildings and property at U.S. embassies in Kenya and Tanzania.
"Finally, 12 1/2 years after those devastating and despicable attacks, Ahmed Ghailani will pay for his crimes," U.S. Attorney Preet Bharara told reporters.
Ghailani was acquitted of the remaining 284 counts of conspiracy and terrorism-related charges, including conspiring to kill Americans and use weapons of mass destruction.
He had faced a minimum of 20 years in prison, but instead received a life sentence.
Ghailani, a 36-year-old Tanzanian, never took the stand.
"Today's sentencing of Ahmed Ghailani shows yet again the strength of the American justice system in holding terrorists accountable for their actions," U.S. Attorney General Eric Holder said in a written statement.
The trial, considered a test for the Obama administration, which had maintained that it could try some terrorism suspects in civilian courts, coincides with both the president's State of the Union address and reports of a possible increase in the use of military commissions.
On the eve of the trial, U.S. District Judge Lewis A. Kaplan excluded testimony from a witness that prosecutors said could provide evidence of Ghailani's involvement in the bomb plot, after learning of the witness' coerced interrogation at a CIA-run detention facility abroad.
The move raised questions over future convictions in the war against al Qaeda, widening the debate over the use of civilian courts for Guantanamo detainees, including alleged September 11 mastermind Khalid Sheikh Mohammed.
Ghailani was captured in Pakistan in 2004 after training with al-Qaeda leaders in the region, where the government says he became a bodyguard and cook for Osama bin Laden.
For two years he was interrogated under the supervision of the Central Intelligence Agency, raising questions of torture that defense attorneys later used as grounds to petition for leniency.
Ghailani was then moved to the U.S. naval base in Cuba where he spent the next three years before being transferred into federal custody in New York, according to court documents.
Throughout the trial, the defense portrayed Ghailani as a man with local knowledge of Tanzania who was exploited by al Qaeda, arguing that his cumulative detention at secret facilities abroad and at Guantanamo deprived him of a speedy trial.
The government rejected the claim that he was duped into participating in planning the attack, pointing to evidence that Ghailani obtained gas tanks in Tanzania and noting his presence in Mombasa, Kenya, with members of the bomb plot.
But during court proceedings, jury members showed signs of division.
Kaplan rejected a defense plea for a mistrial after a juror claimed to be chastised for disagreeing with fellow jurors, heightening prosecutor fears that Ghailani could elude conviction.
The case also came against the background of Ghailani's detention as an "unlawful enemy combatant," a murky classification surrounding the legality of holding terrorism suspects that the Obama administration has tried to distance itself from.
But in the weeks after his November conviction, lawmakers passed legislation meant to prevent Pentagon funding from being used to transfer Guantanamo detainees to U.S. soil, stifling an administration pledge to allow more detainees to be tried in civilian courts.
CNN's Brian Vitagliano and Adam Reiss contributed to this report