Human rights groups have condemned the sentencing of Saif-al Islam Gaddafi, son of former dictator Muammar Gaddafi, and eight others of the previous regime to death.
The United Nations human rights office said the international body was "deeply disturbed" by the sentence given to the 43-year-old in absentia. He had presented the evidence to a Tripoli court via video link.
The UN said: "We are deeply disturbed at the verdicts and sentences handed down in Tripoli in the trial of former Gaddafi officials, in particular the imposition of the death penalty against a number of them. We had closely monitored the detention and trial and found that international fair trial standards had failed to be met.
"Among the key shortcomings is the failure to establish individual criminal responsibility in relation to specific crimes. There were also serious issues relating to access to lawyers, claims of ill-treatment, and trials conducted in absentia."
The younger Gaddafi is currently being detained by a rival militia group which has refused to hand him over the Libyan authorities. He was sentenced over the war crimes committed during the 2011 uprising.
With two rival groups running parallel governments, several regions in the North African country have been gripped by lawlessness topped by an intense power struggle of the militias.
Among 37 people who were on trial, including Saif-al Islam, eight former officials were given the life sentence while seven others were jailed for 12 years; four were acquitted and some got shorter jail terms.
It is still unclear whether there would be an appeal against the verdict though Saif-al Islam's lawyer has promised to challenge the ruling.
Philip Luther, Middle East and North Africa programme director at Amnesty International, said in statement: "Instead of helping to establish the truth and ensuring accountability for serious violations during the 2011 armed conflict, this trial exposes the weakness of a criminal justice system which is hanging on by a thread in a war-torn country with no central authority.
"It's a case that was always going to test the judiciary, but in the end it has shown the difficulties of delivering justice at a time when the rule of the gun overpowers the rule of law.
"The death sentences – the ultimate human rights violation – add further insult to injury, and should be overturned on appeal."