For the second time in two years, Somalia’s UN-backed Transitional Federal Government (TFG) appears to be on the verge of failing. It is being relentlessly attacked by a coalition of Islamist transnational extremists and Islamist nationalists determined to topple the government in Mogadishu. The most recent reports indicate that TFG forces  fully control only six of Mogadishu’s 16 districts, or about 35% of the capital; local journalists claim that the TFG’s actual control is significantly less than that . The securest area is a small patch in the southern part of the city, where 4,300 African Union troops from Uganda and Burundi are guarding the presidential palace, the airport and seaport. The rest of Mogadishu, including the famous open-air Bakara Market, is in the hands of Somalia’s al-Shabab  militant group and an allied coalition called Hisbul Islamiyya (HI) . The opposition’s recent success in Mogadishu came after they launched a coordinated offensive on May 7, 2009 . Al-Shabab and HI have already increased control over most of Somalia’s regions outside of the capital .
The current situation in Somalia is exactly what the United States, the United Nations, the African Union, the League of Arab States and other external actors had hoped to prevent when they endorsed the UN-sponsored Djibouti peace process in 2008 that led to the election of Islamist opposition leader Shaykh Sharif Shaykh Ahmad as president of a new and improved TFG . The actors had hoped that the Islamist cleric, who appeared to be a moderate and a leading figure in the Islamic Courts Union (ICU) , would act as a bridge between the West and the Somali hardliners who were once his allies in the ICU . Sharif’s rise to power in the TFG, however, only served to further infuriate the hardliners, who immediately labeled him a Western “puppet.” It spawned the birth of a new coalition group in early 2009, HI, and intensified the insurgency against the TFG.
This article will highlight the three main political trends that composed the ICU, outline how the divisions within the ICU created governance problems when it took power in June 2006, explain how these same divisions have led to the current failure of Shaykh Sharif’s government in Mogadishu, and reveal some possible scenarios moving forward.
Three Main Factions Within the ICU
According to Somali civil society leaders, journalists, clan elders, residents, and Western analysts interviewed for this article, Somalia’s external actors should have known that the depth and nature of divisions among the Islamists in the Courts would prevent an easy political reconciliation and transition. These divisions were apparent well before neighboring Ethiopia, with U.S. support, intervened to end the ICU’s rule in December 2006 . At its core, the ICU was based around the most dominant clan in Mogadishu, the Hawiye, but it was by no means a homogenous group. From its formal inception in 2000, the Islamists within the ICU were an unwieldy mixture of pragmatists, fundamentalist-nationalists, and jihadists, whose differing political and religious agendas would inevitably cause internal friction .
The pragmatists were led by Executive Committee Chairman Shaykh Sharif Shaykh Ahmad. Most of the pragmatists had been schooled in the generally moderate Sufism current of Islam that took root in Somalia approximately 1,000 years ago. Yet the religious beliefs of many, including Shaykh Sharif, were more in line with a faction of the Muslim Brotherhood movement that promotes the establishment of Islamic caliphates but generally opposes the use of violence to achieve its goal . The pragmatists were at a disadvantage from the beginning, having to compete for power against fundamentalist-nationalists in their midst—represented by shura council leader Shaykh Hassan Dahir Aweys and the ICU’s southern military commander Hassan Turki—and a new jihadist faction led by Aweys’ kinsman and protégé, Aden Hashi Ayro . Aweys’ and Ayro’s factions also received at the very least rhetorical support from al-Qa`ida.
Aweys and Turki, representing the fundamentalist-nationalist faction, became leading Islamists in the ICU because of their association with the Courts’ predecessor, al-Itihaad al-Islami (AIAI) . In the 1990s, AIAI received funding from al-Qa`ida , and its leaders have been implicated in terrorist attacks against Ethiopia over the disputed Ogaden region that is claimed by both Somalis and Ethiopians . Somalis familiar with AIAI, however, assert that the movement had never intended to join al-Qa`ida and participate in a transnational Islamic jihad against the West. They argue that Aweys’ and Turki’s goal was and still is limited to reclaiming Somali-inhabited territories in neighboring countries and forming a Greater Somalia in the Horn of Africa under Islamic law . As one Somali academic noted in 2002, AIAI’s social and nationalist ideals distinguished the movement from al-Qa`ida, but the differences were “largely ignored by the U.S. intelligence community, which chose to narrowly focus on AIAI’s relationship with bin Laden and al-Qaida” .
The jihadist faction was led by Aden Hashi Ayro until his death on May 1, 2008 in a U.S. airstrike . Ayro had a deep and personal connection with al-Qa`ida, having spent time in an al-Qa`ida-run training camp in Afghanistan in the late 1990s . He returned to Somalia and organized the recruitment and training of al-Shabab militia in Mogadishu. Unlike his mentor Shaykh Aweys, however, Ayro was driven primarily by al-Qa`ida’s brand of Salafism. As a result, radicals composing al-Shabab are far more aligned to al-Qa`ida’s ideals and objectives than radicals who once formed the backbone of AIAI .
ICU Disagrees Over Governing Structure
After the ICU defeated a group of CIA-funded warlords and took control of Mogadishu on June 5, 2006, there were immediate divisions and disagreements among the three primary factions composing the ICU leadership . The pragmatists were reluctant to endorse Shari`a based on strict Salafist interpretations as demanded by al-Shabab, and tried their best to distance themselves from the extremists’ idea of justice . The pragmatists were also concerned about the growing ranks of Ayro’s al-Shabab militia and its eagerness to shelter foreign al-Qa`ida operatives .
Pragmatists and Salafist ideologues also disagreed on various other issues, including the status of women and what the ICU’s official stance should be toward the secular TFG and its Western supporters. For obvious religious and political reasons, al-Shabab flatly rejected the pragmatists’ conciliatory approach to the TFG, which was isolated in Baidoa at the time.
The widening agendas between the Islamist factions in the ICU became irrelevant after Ethiopia invaded Somalia in December 2006. With that development, all Islamists faced a common enemy, and “alliances of convenience” were once again formed to fight the Ethiopian occupation.
Aweys and his followers fled to Eritrea. Shaykh Sharif and the other pragmatists also went to Eritrea, where they joined forces with Aweys’ group to form the anti-Ethiopian, anti-TFG Alliance for the Re-Liberation of Somalia (ARS) . It is widely believed that the Asmara-based leaders directed the insurgency of militias loyal to the ICU in Mogadishu, while Ayro and his lieutenants stayed in Somalia to re-organize, recruit and expand the reach of al-Shabab . It is not known where Hassan Turki went during this time, but it is believed he found shelter among his Ogaden kinsmen inside Ethiopia and in his stronghold in the Lower Jubba region .
The Failure of Shaykh Sharif’s Government
By December 2008, the Abdullahi Yusuf-led TFG’s popular support had all but vanished and its control of Somalia had been reduced to only a few city blocks in Mogadishu. Alarmed by the prospect of Somalia “deteriorating into an Afghanistan-like cauldron of militant Islamism” , Somalia’s external actors entered into secret power-sharing talks with the only Islamist they believed they could work with: pragmatist leader Shaykh Sharif Shaykh Ahmad .
The defection of Shaykh Sharif to the TFG re-opened the divisions among the Islamist factions and sharpened their agendas. By cutting a deal with the West, the pragmatists saw an opportunity to regain power. The jihadist al-Shabab, however, saw the departure of Ethiopian troops as an opportunity to fill the power vacuum and take over the government. The group that stood to benefit the least from the situation was the fundamentalist-nationalists led by Shaykh Aweys. They could not support a TFG backed by frontline states Ethiopia and Kenya, which are hostile to the nationalists’ irredentist claim on their territories. At the same time, the fundamentalist-nationalists were becoming disillusioned by al-Shabab’s increasing efforts to rid Somalia of its national identity and replace it with religious zealotry .
The fundamentalist-nationalists found a way to stay viable as a new insurgent group, Hisbul Islamiyya. Led by fighters from the ARS-Asmara faction and the Ras Kamboni Brigades, HI forces are now fighting alongside al-Shabab to oust Shaykh Sharif’s government and to force the withdrawal of international troops. Yet as was the case with AIAI and al-Qa`ida, HI’s alliance with al-Shabab appears to be one of mutual opportunism rather than shared ideals .
In May 2009, Shaykh Aweys and al-Shabab negotiated on forming a common organization. Those talks failed, however, but the two factions agreed to continue to support each other tactically . In the wake of these discussions, reports from Somalia suggested that Shaykh Aweys was searching for a negotiated truce with the TFG . As of July 2009, however, Shaykh Aweys and HI have not moved in either direction, and they continue to collaborate with al-Shabab.
Yet if HI were to implement a meaningful truce with the government, the TFG would have to agree to at least two likely demands: 1) setting a timetable for the withdrawal of AMISOM, and 2) ending Ethiopia’s training, arming and military support of TFG troops, secular warlords and their militias, and the armed Sufi group Ahlu-Sunna wal-Jama in central Somalia . Aweys and HI would be required, among other actions, to sever all ties with Ethiopia’s rival Eritrea  and renounce extremism and violence to satisfy the international community.
Given the lack of trust between all sides in the conflict, a truce, moreover a peace deal, will be a difficult task. Yet if a settlement could be achieved, a public reconciliation with Aweys could give Shaykh Sharif a chance to redefine his embattled government as a defender of Somali nationalism and Islamic values. A revitalized Islamist government with a popular mandate would be an effective counter to al-Shabab’s efforts to grab power, which is of special concern due to its ties with al-Qa`ida and the use of foreign fighters .
It is not at all clear, however, if Somalia’s external actors—notably Somalia’s immediate neighbors Ethiopia, Kenya, and Djibouti—would be willing to support a Somali government with a nationalist agenda. Such a government would likely result in the neighbors seeking proxies in Somalia to protect their interests and keep the country mired in conflict. Somalia’s future again remains dependent on the actions of various actors and groups with radically different agendas for the country.
Anonymous is a correspondent based in East Africa.
 “TFG forces” refer to government soldiers who had been previously recruited by the transitional government of President Abdullahi Yusuf and Islamic Courts Union (ICU) fighters who remained loyal to Shaykh Sharif Shaykh Ahmad. ICU fighters battled Yusuf’s forces from early 2007 to the end of 2008, but a deal to merge Shaykh Sharif’s opposition faction and the TFG in June 2008 required government soldiers and Sharif’s ICU loyalists to work alongside each other.
 This is an estimate extrapolated from interviews with seven Somali sources living in various areas of Mogadishu. The consensus is that TFG forces remain in five districts in southern Mogadishu and only one in the north. The sources add that al-Shabab has been offering cash for TFG weapons and for the troops to desert their posts.
 Al-Shabab has ties to al-Qa`ida.
 Hisbul Islamiyya is an Islamic party founded in February 2009. It is composed of four factions opposed to Shaykh Sharif’s new government: the hard-line Asmara wing of the Alliance for the Re-Liberation of Somalia led by Shaykh Hassan Dahir Aweys; Harakat Ras Kamboni, a southern Somali Islamist group affiliated with Shaykh Hassan “Turki,” who has had ties with al-Shabab; the Islamic Front of Jabhatul Islamiyya, an insurgent group formed in 2007 to oppose Ethiopian troops in Somalia; and a little-known, Harti clan group called Anole and based in Kismayo. It has largely allied itself to al-Shabab, although it is a distinct organization.
 A reliable Somali source said the violence was triggered by an attempt by ICU fighters to assassinate an al-Shabab commander named Qoslaye, who led al-Shabab’s “death squad” in Mogadishu. Qoslaye escaped but his trusted bodyguard was killed. Enraged, Qoslaye ordered an attack on ICU forces. For more background details, see “Al-Shabab Blamed for Murder of Somali Lawmaker and Commander,” Voice of America, April 17, 2009.
 This does not include the self-declared independent Republic of Somaliland and the provisionally autonomous Puntland State of Somalia in the north. For an in-depth and current look at the status of forces in Somalia’s regions apart from Somaliland and Puntland, see Michael A. Weinstein, “The Status of Conflict in the Southern and Central Regions of Somalia,” CTC Sentinel 1:7 (2009).
 The deal, signed in June 2008, subsequently led to the pullout of Ethiopian troops from Somalia. For details of the Djibouti peace agreement, see International Crisis Group, “Will Djibouti Do the Trick?” July 6, 2008.
 “Somalia’s Moderate Islamist Leader,” BBC, January 22, 2007.
 Shaykh Sharif caused a split in the Asmara-based Alliance for the Re-Liberation of Somalia (ARS) opposition group when he and his followers began secret talks with the United Nations and the TFG in March 2008. ARS hardliners, led by Shaykh Hassan Dahir Aweys, boycotted the talks in Djibouti because of Ethiopia’s presence at the discussions. The ARS subsequently became two entities: Sharif’s ARS Djibouti faction and Aweys’ ARS Asmara faction.
 Ethiopia’s military invasion technically began on July 20, 2006, when troops crossed into Somalia to prop up the TFG under President Abdullahi Yusuf in the southwestern town of Baidoa.
 Personal interview, Matt Bryden, former International Crisis Group analyst, Nairobi, December 5, 2006.
 Shaykh Sharif has publicly stated that in his view Shari`a law allows for women to serve in parliament and that the democratic process, which al-Shabab condemns as a “Western” idea, is “not inherently against Islam.”
 As members of the Ayr sub-clan of the Habr Gedir (Hawiye), Aweys and Ayro formed a close association in the mid-1990s. According to an Ayr clan elder interviewed in Mogadishu in 2007, Ayro was under Aweys’ tutelage for several years before the Islamic cleric arranged for Ayro to be sent to Afghanistan to be further trained by al-Qa`ida.
 For background information on AIAI, see International Crisis Group, “Countering Terrorism in a Failed State,” May 23, 2002.
 AIAI is also believed to have cooperated with the al-Qa`ida operatives who carried out the 1998 U.S. Embassy bombings in Kenya and Tanzania.
 According to these observers, Usama bin Ladin understood AIAI’s determination to achieve Somali unity at any cost and simply exploited it by sending money and weapons to AIAI and co-opting the group into al-Qa`ida’s efforts to turn Somalia into a radical Islamic republic.
 Personal interview, Somali historian, Mogadishu University, Mogadishu, February 11, 2002.
 Al-Shabab is now led by Ahmed Abdi “Godane,” also known as Shaykh Mukhtar Abu Zubeyr.
 Personal interview, Matt Bryden, former International Crisis Group analyst, Nairobi, December 5, 2006.
 For an excellent comparative analysis of AIAI and al-Shabab, see International Crisis Group, “Counter-Terrorism in Somalia – Losing Hearts and Minds?” July 11, 2005.
 As Somalia analyst Dr. Michael Weinstein noted in an article published the following month, “The revolutionary character of Somalia’s politics became evident when the hard-line Islamist faction of the I.C.U. led by Sheikh Hassan Dahir Aweys, who is on Washington’s list of al-Qaeda supporters, gained ascendancy over the moderate group headed by Sheikh Sharif Sheikh Ahmed on June 25. Whereas Ahmed had said that the I.C.U. was not interested in imposing an Islamist social model on Somalia and was only concerned with bringing peace and order to the country, Aweys insisted that the new I.C.U. would not be satisfied with anything less than a state governed by Shari’a law.”
 “Meeting Somalia’s Islamic Insurgents,” BBC, April 28, 2008.
 Personal interview, Somali journalist, Mogadishu, March 20, 2008. According to the journalist, the pragmatists vehemently opposed the harboring of al-Qa`ida operatives in Somalia, which they believed was “tantamount to an invitation for the United States to start bombing the country.” The journalist said the pragmatists lacked any power over al-Shabab and were threatened into silence.
 “Somali Opposition Alliance Begins Fight Against Ethiopia,” Agence France-Presse, September 20, 2007.
 Personal interview, Abdurahin Isse Adow, ICU military commander, Mogadishu, April 3, 2008.
 In September 2007, Turki allowed an al-Jazira television crew to videotape inside a military camp he was running on the Kenya-Somalia border.
 Jeffrey Gettleman, “Situation in Somalia Seems About to Get Worse,” New York Times, December 7, 2008.
 Personal interview, UN source, Nairobi, August 10, 2008.
 Al-Shabab’s attempts to eradicate Somali nationalism is highlighted in Abdulahi Hassan, “Inside Look at the Fighting between al-Shabab and Ahlu-Sunna wal-Jama,” CTC Sentinel 2:3 (2009).
 “Somalia: Aweys Condemns Security Minister’s Assassination,” Garowe Online, June 19, 2009. In the report, Aweys acknowledged that various armed factions fighting the Somali government do not have a “unified ideology.”
 “Shifts in Somalia as Exile Returns,” BBC, April 28, 2009. The BBC reporter, Mohamed Mohamed, says “members of the radical Islamist group al-Shabab were said to have been at his welcoming rally” when Aweys returned to Mogadishu after two years in exile in Eritrea.
 Scott Baldauf, “The Fiery Sheikh Dahir Aweys May Be Ready to Hash out a Peace Deal,” The Christian Science Monitor, June 17, 2009. On July 9, 2009, a member of HI reportedly told Radio Garowe that Shaykh Aweys had agreed to peace talks with the TFG, following talks with Egyptian mediators.
 According to reliable Somali sources in the Gedo region, about 700 Ahlu-Sunna wal-Jama fighters recently returned after completing military training in Ethiopia.
 Since early 2006, Eritrea has been accused by the United Nations and the United States of funneling weapons to al-Shabab and providing militants a base for terrorist training. New allegations of Eritrean support for Somali insurgents have recently re-surfaced. For details, see Margaret Besheer, “UN Security Council Considering Sanctions Against Eritrea, Others,” Voice of America, July 9, 2009.
 The United States, for example, has alleged that approximately 300 foreign fighters have joined their forces to fight against the TFG. See Frank Nyakairu, “About 300 Foreigners Fighting Somalia Gov’t-UN,” Reuters, May 15, 2009.