File Photo, Military forces supporting anti-government opposition groups display their weapons in Mogadishu, Somalia Friday, May 7, 2021. AP
Under a deal announced late Sunday after talks between Prime Minister Mohamed Hussein Roble and state leaders, parliamentary polls that should have wrapped up last year are now due to be concluded by February 25.
The election impasse set off a bitter power struggle between Roble and President President Mohamed Abdullahi Mohamed, better known as Farmajo, that threatened the stability of the fragile Horn of Africa nation.
The UN mission in Somalia said on Twitter it was "pleased" at the consensus reached during the meetings of the National Consultative Council.
But it added: "The priority now is to implement these decisions to achieve a credible and widely-accepted result by the new deadline.
"The UN encourages Somali's political leaders to continue in a spirit of cooperation, avoid provocations that risk new tensions or conflict and stay focused on delivering a credible electoral process quickly for the benefit of all Somalis."
The international community had voiced fears that the election delays and the Roble-Farmajo feud could tip the country deeper into crisis as it continues to battle a deadly insurgency by Al-Shabaab jihadists.
Somalia is also in a grip of a severe drought that according to the United Nations has left one in four people facing acute hunger.
Farmajo's four-year mandate expired in February last year, but was controversially extended by parliament the following April, triggering deadly gun battles on the streets of Mogadishu.
Roble then brokered a new election timetable, but in the months that followed, the pair's bitter rivalry derailed the process again.
In the latest spat, Farmajo suspended Roble, but the premier defied the order, accusing the president of violating the constitution and of an "attempted coup".
The country's elections follow a complex indirect model. Nearly 30,000 clan delegates are assigned to choose 275 MPs for the lower house while state legislatures elect senators for the upper house, a process that has now been completed.
Once the lower house election is concluded, both assemblies vote for the next president.