Libyan prosecutors have opened the trial of deposed leader Muammar Gaddafi's sons and former regime officials  in a major test for the North African state's transition to a democracy.

Neither Saadi Gaddafi or Saif al-Islam were in the courtroom at Tripoli's Al-Hadba prison, but Gaddafi's ex-spy chief Abdullah al-Senussi was among the former officials sitting behind a fenced-off section, a Reuters reporter said.

"Saadi will not be showing up today, and they will take a decision on Saif al-Islam on whether his case will be an open or closed session," Chief investigator Sidiq al-Sour told Reuters by telephone.

Saif al-Islam, long viewed as Gaddafi's heir and still held by a group of former rebels in western Libya, was expected to appear by video-link inside the courtroom.

Post-Gaddafi Libya has so far been defined by a weak interim government and growing unrest as former revolutionary fighters refuse to give up their weapons, and armed protesters blockade the country's crucial oil exports.

The trial began a day after interim prime minister Abdullah al-Thinni announced his resignation after an attack on his family and following the ousting of the previous prime minister barely a month ago.

Senussi was joined in the court by Gaddafi's former prime minister Baghdadi al-Mahmoudi, and former foreign minister Abdul Ati al-Obeidi, a Reuters reporter said. Also in the court was ex-intelligence chief Buzeid Dorda, who had appeared at earlier trial proceedings.

The men face charges ranging from corruption to war crimes related to the deaths during the 2011 uprising, which expanded into a civil war that eventually ousted Gaddafi. The former Libyan leader was later killed after his capture.

The International Criminal Court and other human rights organisations are concerned over the fairness of Libya's justice system although the government won the right last year to try Gaddafi's former spy chief domestically instead of at the ICC.

RIGHTS CONCERNS

Libya's nascent democracy has struggled to establish basic institutions and the rule of law as Gaddafi left behind a shell of a government after absorbing all the power into his own hands during his four-decade rule.

"If they don't get fair trials then it casts doubt over whether the new Libya is not about selective justice," Hanan Salah, Libya researcher in the Middle East and North Africa division at Human Rights Watch said.

"So far, there have been problems with legal representation. Many of those on trial did not have a lawyer from the beginning - a cornerstone of a fair trial."

Saadi Gaddafi, known as a playboy with a brief career in professional soccer, was extradited to Libya from Niger in early March. He had been expected to appear in court for the first time to hear charges.

Gaddafi's more prominent son, Saif al-Islam, is being held by the powerful western Zintan militia group, who have refused to hand him over to the central government, saying they believe it cannot provide a secure trial.

"We have had many cases where the defendants' lawyers were not allowed to review evidence and get access to court documents in the pre-trial phase (the pre-trial chamber) ..." Salah said.

"In some other unrelated cases, judges and lawyers were harassed and there are allegations of forced confessions."

Libya's justice minister insisted that the trial was open to the public who would ensure the process was fair and not turn into a "Mickey Mouse" show trial.

"I will not allow any crazy stuff, I will make sure it meets international standards ... that is why we are having open trials," Salah al-Merghani, the justice minister told Reuters.

"We heard there were complaints from the lawyers ... The court will see if the complaints are genuine or not."

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.