Libya's legally installed government, the General National Congress (GNC), has removed Omar al-Hassi from his post as prime minister.

Omar Hemidan, the spokesman for the GNC, said on Tuesday that the decision was the first step for dialogue among Libya's warring factions.

The GNC operates out of the capital Tripoli while the UN-recognised government, the House of Representatives (HoR), was driven out of the capital last year and has been confined to the small eastern city of Tobruk.

In an effort to address the country's political crisis, delegates from the rival administrations have been meeting at UN-brokered talks in what has been described as one of the last chances to stop the country from plunging into a full-scale civil war.

Libya has been wracked by violence since the NATO-backed uprising toppled longtime ruler Muammar Gaddafi in 2011, with the rival administrations and their allied militias battling for power.