On Saturday, al Shabab, southern Somalia’s Islamic rebel movement, pulled out of the capital Mogadishu. For months, Somalia’s Transitional Federal Government (TFG) and approximately 9,000 troops from the African Union Mission for Somalia (AMISOM) had been battling al Shabab block by block in the city. In July, Boubacar Diarra, the head of AMISOM, argued in Foreign Policy that the battle for Mogadishu demonstrated what the force could accomplish with donor support. Diarra did not reveal what AMISOM’s strategy would be after taking Mogadishu, except to say that if donors provided the means to increase the force to 20,000, AMISOM could drive al Shabab out of Somalia. Now that the conquest of Mogadishu is at least momentarily complete, a moment of truth has come for the TFG and AMISOM. What comes next?

First of all, it is not clear that al Shabab’s withdrawal from the capital presages their imminent defeat. The optimism Diarra projected in July is not shared, for example, by the UN Monitoring Group on Somalia and Eritrea, whose recent report (.pdf, p. 12) said:

The response of Al-Shabaab to military setbacks in Mogadishu, the central regions and the Juba Valley has been to aggressively expand its control over the southern Somali economy. Given its lack of popular support, political fractiousness and military limitations, Al-Shabaab’s greatest asset today is its economic strength. The Monitoring Group on Somalia and Eritrea estimates that Al-Shabaab currently generates between US$ 70 million to US$ 100 million per year in revenue from taxation and extortion in areas under its control, notably the export of charcoal and cross-border contraband into Kenya. Given the corrupt and predatory practices of the Transitional Federal Government, many Somali businessmen find Al-Shabaab to be better for business, and from a purely commercial perspective have little interest in seeing the group displaced by the Government. Al-Shabaab’s core leaders have also responded to domestic difficulties by seeking to align themselves more closely with foreign jihadist entities and to provide a platform for like-minded groups in the region. The July 2010 Kampala bombings were the first successful Al-Shabaab operation beyond Somalia’s borders. They also signalled a new and alarming trend, in which East African extremist groups inspired and mentored by Al-Shabaab, including the Muslim Youth Centre in Kenya, might represent the next generation of extremist threats in East Africa and the wider region.

Reuters’ Richard Lough argues that al Shabab’s withdrawal indicates that within its divided leadership, the “international wing influenced by foreign fighters who favor guerrilla tactics like suicide bombings…won the day.” This wing’s victory, Lough adds, “could herald a wave of al Qaeda-style suicide attacks.” Whether or not that prediction proves true, the widespread reports of divisions within al Shabab suggest the movement’s tactics may soon change, making a conventional military campaign against them more difficult.

It is also not clear that al Shabab has left the capital for good. Ali Mohamud Rage, a spokesman for group, promised that al Shabab would return, and some analysts take him at his word. Mogadishu remains vulnerable in part because of the TFG’s own operational and political weakness:

The rebels’ departure from the capital offers no guarantee that Somalia’s weak transitional government, which has let innumerable other opportunities slip through its fingers, will be able to gain control of Mogadishu, or that the city’s population will rally behind the government. The Transitional Federal Government has been propped up by millions of dollars of Western aid, including American military aid, but its leaders remain ineffectual, divided and by many accounts corrupt. […] Mogadishu residents said that emissaries of various warlords were beginning to identify bases in the neighborhoods that the Shabab had just vacated, which could spell another problem for the troubled government.

Al Shabab may not even be completely gone. Reports say al Shabab was still launching some attacks in Mogadishu over the weekend.

The complications the TFG faces – guerrilla attacks from al Shabab, difficulty controlling Mogadishu, and a vast expanse of unconquered territory in southern Somalia – lead James Gundun to say that while al Shabab’s insurgency may have peaked, he expects prolonged and brutal fighting ahead if the TFG tries to push further into rebel territory.

Reinforcing the TFG’s military challenges are its political problems. Its legal mandate was set to expire this month, though a deal signed in Kampala in June delayed presidential elections for a year and temporarily resolved a dispute between President Sheikh Sharif Sheikh Ahmed and Speaker of Parliament Sharif Hassan Sheikh Aden. The Kampala Accord bought the TFG some time, but also paraded the government’s weakness and internal fractures before the world. Donor confidence was waning earlier this summer, and even the victory in Mogadishu is unlikely to completely restore it. The clock is ticking on the time the TFG has left to show the international community that it can not only fight, but govern. As Ambassador David Shinn told the US Congress in July,

If [the TFG] cannot make significant progress by the end of its extended mandate, it is difficult to imagine there will be any support left for it in the international community. Many in the Somali-American diaspora and anumber of American scholars who follow the situation in Somalia have already given up on the TFG. I have not heard, however, from those who want to end support for the TFG an acceptablealternative entity to work with in Somalia. Nevertheless, if the TFG continues its internal squabbles and fails to make progress, I may find myself joining this group in August 2012 when there would hopefully be an acceptable alternative.

The “significant progress” that Shinn and others want to see would involve, I think, political progress even more than military progress. A lack of political will, in other words, could undo any gains made on the battlefield.

As the TFG attempts to consolidate its gains in Mogadishu and al Shabab pulls back to re-evaluate its tactics, something in Somalia’s civil war has definitely changed. But whether that change favors the TFG in the long run remains to be seen.