Prime Minister Abdullah al-Thinni and his Cabinet resigned late on Thursday to pave the way to forming a new government after parliamentary elections in June, a government statement said.

The North African oil producer is at risk of splitting or even sliding into civil war after rival groups set up an alternative parliament this week. The competing parliaments and fighting among former rebels who helped topple Muammar Gaddafi in 2011 have created uncertainty and chaos in Libya.

Thinni’s Cabinet said it had resigned according to Libya’s constitutional rules to allow the House of Representatives to form a government based on all parts of society. Thinni had been in office since March.

“This is just a routine step. There is no conflict between Thinni and the House of Representatives,” a lawmaker said. “Thinni is a candidate to form the next government.”

The House of Representatives and government have moved to Tobruk in the far east to escape a month of street fighting in the capital, Tripoli.

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.