* Saif appears in video-link before court
* Defendants claim little access to lawyers
* Trial seen as test of democracy transition (Adds details, quotes, background)
By Ulf Laessing
TRIPOLI, April 27 (Reuters) - The son of late Libyan leader Muammar Gaddafi appeared via video-link on Sunday with 22 others to hear charges in a Tripoli court ranging from war crimes to corruption in a major test of whether the state can implement the rule of law.
Saif al-Islam, the most high-profile of Gaddafi's seven sons, smiled and looked confident on the link-up from a jail in the western town of Zintan where he has been held since he was captured by former rebels.
The rebels refuse to hand Saif over, saying they do not trust the government to ensure he won't escape, but have agreed to have him tried in a government court.
Twenty-two former Gaddafi officials were present in the court inside the heavily guarded Al-Hadba prison, including former spy chief Abdullah al-Senussi. Eight others joined via videolink from the western city of Misrata.
The judge took about 20 minutes to read out the charges, accusing the defendants of giving orders to arm militias and kill peaceful protesters and locking up thousands of political opponents. They are also charged with ordering power cuts to rebel-held cities and damaging oil facilities during the eight-month uprising against Gaddafi in 2011.
Libya has struggled to establish basic institutions and the rule of law since Gaddafi's four-decade one-man rule ended in 2011, with brigades of militias and former rebels challenging the authority of the weak central government.
The International Criminal Court and other human rights organizations worry about the fairness of Libya's justice system although the government won the right last year to try Gaddafi's former spy chief at home instead of at the ICC in The Hague.
When the judge asked Saif, once seen as Gaddafi's heir, whether he had a lawyer present to defend him he said twice: "It's with God."
The court later decided to appoint a lawyer for him.
If convicted, some of the defendants could face the death penalty. It was not clear how - or if - the rebels would execute such a verdict.
Several defendants, including Senussi, complained they had not been given enough access to lawyers. "I want a non-Libyan lawyer," said the once corpulent Senussi, who appeared to have shrunk after more than a year in prison. "I want justice."
Several lawyers complained they had not been able to spend enough time with defendants or get copies of the formal charges. The judge later ordered the state prosecutors to give them copies.
Others in the dock included Gaddafi-era prime minister Baghdadi al-Mahmoudi, former foreign minister Abdul Ati al-Obeidi and ex-intelligence chief Buzeid Dorda.
Saadi Gaddafi, known as a playboy with a brief career in professional soccer who was extradited to Libya from Niger in early March, did not appear in court because prosecutors have yet to complete the investigation against him.
The court adjourned the session until May 11 after rejecting petitions from lawyers to release several defendants.
In a new sign of growing influence of Islamists since Gaddafi's fall, officials allowed female reporters into the courthouse only after they had put on a headscarf as sign of modesty.
Tripoli has been mostly spared rampant crime in other parts of the country. But on Sunday gunmen attacked a van belonging to a commercial bank with rocket-propelled grenades, robbing $5 million and snatching two employees, banking officials said. (Reporting by Ulf Laessing; Editing by Patrick Markey, Lynne O'Donnell and Sonya Hepinstall)