Tripoli: Opposing factions in the Libyan parliament were to meet on Monday for UN-brokered talks on ending a split that has left the country with rival governments, a UN official said.

The hard-won meeting in the remote oasis town of Ghadames, which was only confirmed overnight, was the fruit of marathon shuttle diplomacy between the two sides by UN mission chief Bernardino Leon.

The majority faction in the legislature elected on June 25 has been meeting in the far eastern town of Tobruk near the Egyptian border since Islamist militia and their allies took control of most of the capital last month.

The minority faction stayed in Tripoli and has boycotted the Tobruk sessions.

Twelve representatives from each side are to take part in talks in Ghadames, 600km southwest of Tripoli and close to the Algerian and Tunisian borders, parliament spokesman Fraj Abu Hashem said.

The Tobruk-based government of Prime Minister Abdullah Al Thinni is internationally recognised but Libya’s three main cities are almost entirely outside its control.

The Islamists and their allies have established a rival government in Tripoli headed by Omar Al Hassi and have reconvened the previous legislature which they dominated.

The Ghadames talks are aimed at reaching a “framework agreement on the rules of procedures” for parliament and another on “the critical issues relating to the governance of the country”, the UN mission said earlier this month.

The mission said it hoped the two sides would also agree a date and venue for a ceremony during which the previous parliament would hand over power to the internationally recognised legislature.

“Agreement on these points will allow for future discussions on the critical issues of governance and the political transition and full normalisation of institutions and the country,” it added.

Libya has been in turmoil ever since the Nato-backed uprising which ousted and killed longtime dictator Muammar Gaddafi in 2011 with a myriad of former rebel militias vying for power.