The agreement was reached after several days of talks hosted by Prime Minister Mohamed Hussein Roble with state leaders to try to defuse a bitter political crisis.
“The ongoing election of the House of the People (lower house) will be completed between the periods of January 15 and February 25, 2022,” said a statement issued after the talks in the capital Mogadishu.
Roble and Somalian President Mohamed Abdullahi Mohamed, better known by his nickname Farmajo, have long been at loggerheads over the long-delayed elections, with fears their squabbling could erupt into violence.
The international community has voiced its alarm over the crisis, fearing for the fate of the fragile Horn of Africa nation as it continues to battle a deadly insurgency by Al-Shabaab Islamist militants.
The long-running dispute between the two leaders erupted again last month when Farmajo suspended Roble, the man he had himself chosen as premier in September 2020.
Roble defied the order, accusing the president of violating the constitution and of an “attempted coup”, while troops loyal to him patrolled the streets of the capital.
Farmajo whose term as president ended almost a year ago faced calls from opposition leaders to vacate his office and for him to face an investigation into his actions.
Roble has insisted that Farmajo restore his powers before the elections can resume, and accused the president of using the armed forces to exert influence over the process.
“Members of the armed forces must be neutral about the political matters and be confined to fulfilling their duties to protect the nation while abiding by the law of the country,” Sunday’s statement said.
“AMISOM peacekeeping forces should enforce security at the presidential palace”, the statement added, referring to the African Union mission in Somalia.
Farmajo’s four-year mandate expired in February, but was controversially extended by parliament in April, triggering deadly gun battles on the streets of Mogadishu, with some rivals viewing it as a flagrant power grab.
Roble then brokered a new timetable to a vote, but in the months that followed, the pair’s bitter rivalry derailed the polls again.
They only agreed to bury the hatchet in October, and issued a unified call for the glacial election process to accelerate, with voting for the lower house kicking off in November.
But their clash spilled out into the open again when Farmajo suspended Roble, accusing him of corruption for alleged interfering in a probe into a scandal over army-owned land.
As the various crises have played out, fighters from the Al-Qaeda-linked Al-Shabaab are continuing to wage deadly attacks, and last month raided a town near the capital.
Somalia has not held a one-man one-vote election in 50 years.
Voting follows a complex indirect model, whereby state legislatures and clan delegates pick lawmakers for the national parliament, who in turn choose the president.
Nearly 30,000 clan delegates are assigned to choose the 275 MPs for the lower house, while Somalia’s five state legislatures elect senators for the 54-member upper house.
Somalian leaders agree to hold late elections