A week of difficult talks in Addis Ababa between Ahlu Sunna and TFG has yielded a tentative power-sharing accord.
The agreement initialed by representatives of the TFG, or Transitional Federal Government and the Sufi Islamist Al Sunna Wal Jama'a, or ASWJ, calls for integration of security forces.
Somali sources, who asked not to be identified because they are not authorized to speak, say the two groups would have combined strength of more than 20,000. By contrast the extremist rebel group al-Shabab is believed to have no more than a few thousand armed fighters, many of them foreigners.
Those sources, representing both the TFG and ASWJ, say a joint offensive could quickly recapture the parts of southern and central Somalia under al-Shabab control.
But the deal faces a daunting array of of potential stumbling blocks before a hoped-for signing ceremony early next month. Both the TFG and ASWJ are highly fractious groups with strong views on sensitive issues, including the true meaning of Islam, the religion that at once unites and divides the country.
Another potential deal-breaker is the issue of sharing power. The tentative agreement calls for the ASWJ to be given five ministerial posts in Somali President Sheik Sharif Hassan's cabinet, and 34 other government positions. That inevitably means the displacement of several senior TFG officials.
An ASWJ source close to the negotiations told VOA the Sufi group is pushing for the removal of some senior TFG officials who favor the more extreme Wahabi form of Islam practiced by al-Shabab.
TFG Telecommunications Minister Abdirizak Osman 'Jurile' says both sides will be going back to Somalia over the next two weeks to tackle the formidable task of selling the deal to their supporters.
"We are going to organize, mobilize the population, because you know the ASWJ is not a political organization, it is a grass root community driven religious leader led movement that is against this Wahabism, extremism that is destroying our culture, our unity, our independence. Then after, we (will) officially announce agreement of total integration of the two."
The tentative TFG/ASWJ alliance has broad international backing, including from the United Nations and the African Union, which provide the 5,300 strong AMISOM peacekeeping force in Mogadishu. Jurile said other world and regional powers are committed to make the deal work, led by the community of east African states known as IGAD.
"The United States of America is leading. We are getting support from the US government in terms of the security sector, the political sector, in terms of other financial sectors they are supporting us. European Union same. Arab League the same, not to mention the role played by our sub-organization IGAD member states, but particularly Ethiopia, which is extremely day and night making efforts that this process move faster with tangible results."
Jurile and others say the hoped for alliance would clear the way for an all-out military offensive to break the al-Shabab stranglehold over much of the country, including Mogadishu. Al-Shabab, which claims close links with al-Qaida, has said it would respond to any offensive with a full-scale war.
That prospect has triggered a fresh wave of refugees fleeing to neighboring countries. The UN refugee agency last week estimated that 8,000 people had fled Mogadishu since the beginning of February, adding to the more than half a million Somalis living as refugees, both in the Horn of Africa and the nearby Arabian peninsula.