Former Libyan dictator Muammar Gaddafi's two sons will stand trial on Monday accused of war crimes against civilians during the country's 2011 civil war.

Saif al-Islam Gaddafi and his younger brother Saadi are accused of orchestrating a campaign of murder, torture and bombardment of civilians, and will appear alongside Gaddafi's former spy chief Abdullah al-Senussi, two former prime ministers and 34 senior officials.

The defendants are accused of masterminding several massacres in the early days of Libya's revolution and later rounding up, torturing and killing hundreds of opponents.

Saif al-Islam and Saadi are also accused of appropriating state funds to fund extravagant lifestyles abroad.

Due to security fears, the trial has been moved to Tripoli's maximum security al-Hadba prison, which has been surrounded by armoured cars and barbed wire.

Although few details of the case have been released, documents filed by Libya with the International Criminal Court (ICC) reveal a substantial charge sheet, with 40,000 pages of evidence and over 200 witnesses.

The trial takes place against a backdrop of violence in Libya, with rebel militias blockading oil production in key ports.

Libya's interim Prime Minister Abdullah al-Thinni resigned on Sunday, weeks after his appointment, amid claims of threats and an attack on his family.