The first former Guantanamo Bay detainee to be tried in a US civilian court was Tuesday sentenced to life imprisonment without parole for his role in the 1998 bombings of two US embassies in Africa.

The US administration swiftly welcomed the jailing of Ahmed Ghailani, 36, found guilty last year of conspiracy to damage or destroy US property in the truck bombings that killed 224 people at the embassies in Tanzania and Kenya.

"Today's sentencing of Ahmed Ghailani shows yet again the strength of the American justice system in holding terrorists accountable for their actions," Attorney General Eric Holder said in statement.

Judge Lewis Kaplan had indicated earlier that he was inclined to impose the harshest sentence available.

"Mr Ghailani knew and intended that people would be killed as a result of his own actions," Kaplan told Tuesday's hearing.

"Today is about justice, not only for Mr Ghailani, but for the victims of his crimes."

The Tanzanian national's trial in New York has been a test of President Barack Obama's pledge to close the internationally criticized Guantanamo Bay jail in Cuba where suspects have been subjected to military tribunals.

Secretary of State Hillary Clinton Tuesday stressed again the Obama administration's goal of shuttering the notorious goal.

"We are absolutely committed to closing Guantanamo," Clinton told reporters during a press conference with Spanish Foreign Minister Trinidad Jimenez.

But new questions about how to deal with its inmates arose after Ghailani's trial ended with the surprising verdict of guilty on just one of 286 charges related to the embassy attacks.

Holder stressed Tuesday that the sentencing showed how the US federal system could successfully try terror suspects.

"As this case demonstrates, we will not rest in bringing to justice terrorists who seek to harm the American people, and we will use every tool available to the government to do so," Holder added in his statement.

Last week, Kaplan rejected a defense motion to overturn that one count, saying Ghailani had demonstrated "knowing and willing participation" in the truck bomb plot.

And on Tuesday, he further rejected defense claims that Ghailani's sentence should be mitigated because he had been subjected to harsh interrogation in Guantanamo.

"For every hour of pain and suffering" that he went through, "he caused a thousand fold pain and suffering," Kaplan said.

During the trial, prosecutors painted Ghailani as a keen member of a local Al-Qaeda cell in Tanzania and participant in the plot to build two truck bombs and ram them into the two embassies.

His defense argued that he only acted as a dupe of more sophisticated associates and that he never knew his actions would lead to bombings.

However, even his own attorneys did not deny that he took part in the purchase of a truck and gas tanks that were used in the deadly attacks.

The trial highlighted the bitter argument in Washington over where to put on trial and imprison terrorism suspects.

Human rights advocates said Ghailiani could not be tried fairly because he had been mistreated in secret CIA prisons and then held in Guantanamo.

Opponents of Obama's ambitious, but now largely stalled plan to close the military detention center said Ghailani did not deserve the same judicial protections as US citizens.