By Rashid Abdi
BBC Focus On Africa magazine
The Islamist alliance, the Union of Islamic Courts, may have succeeded in gaining control in much of Somalia, but, having defeated the country's warlords, the papered-over cracks in the alliance are now becoming more noticeable.
Aweys has ordered "holy war" against Ethiopian troops in Somalia
The UIC is split between its Salafist and Qutubist tendencies, led by Sheikh Hassan Dahir Aweys and moderate cleric Sheikh Sharif Sheikh Ahmed, respectively.
Mr Aweys, on the US list of those allegedly linked to terrorism, is widely believed to be the genius behind the military campaign that led to the UIC's victory.
But while he was secretly planning, Mr Ahmed, a Sudanese-trained former secondary school teacher, was slowly carving a niche for himself in the international media as the acceptable face of political Islam in Somalia.
World Cup crackdown
Mr Aweys converted to radical political Islam in the early 1990s and joined al-Itihaad al-Islamiya, a group that, like the UIC, brought together various strains of modern political Islam.
But al-Itihaad was defeated by Ethiopian forces and militia loyal to Puntland leader Abdullahi Yusuf - now Somalia's interim president - and Mr Aweys retreated to his home region in central Somalia.
Later, he went to Mogadishu and began a period of self-education, which observers say led him to the Salafi ideology.
This doctrine, an off-shoot of the Saudi Wahhabi school, seeks to promote a version of Islam that emphasises ritual purity.
It frowns upon all forms of bid'a, or modern innovation, and it was in this context that UIC-aligned militiamen cracked down on cinemas showing World Cup football matches.
The Salafi ideology regards television and sports as lahw - vulgar past-times - and is both opposed to rationalism and virulently anti-modernist.
Salafis favour a rigid and literal interpretation of Islamic texts and regard other Muslim sects as deviants. They teach against compromise and holy war is the pivot around which their beliefs revolve.
The Somali counter-current to Salafism is Qutubism, which owes its birth to the Egyptian Islamist thinker Sayyid Qutub and his book In The Shade Of The Koran.
Qutub's vision is less atavistic than the Salafist vision and his critique of modern Western civilization is, in the main, not too extreme.
And it is Mr Ahmed who has emerged as its principle proponent in Somalia, speaking in favour of engagement with the West and with the transitional government.
Ahmed is in favour of engagement with the West
But in a society where the gun rules, it is difficult to see how he can become a powerful player. Real power lies with Mr Aweys.
And given the deep grudge he bears President Yusuf following al-Itihaad's bloody defeat, he may capitalise on his new-found power to make life difficult for the weak president and further his ambitions for a Greater Somalia.
Meanwhile in Mogadishu, the situation is further complicated by inter-clan rivalries, as well as the apparent resurgence of the traditional mainstream Sunni sects that are creating their own Islamic courts in a bid to counter the influence of the UIC.
There have been suggestions that violence could break out between the rival Islamic groups as they jostle for power.
At the moment, Mr Aweys needs Mr Ahmed to mollify the critics of the UIC at home and abroad, but a major falling-out is inevitable at some stage.
Indeed, Mr Ahmed has hinted at resigning in an interview with the London-based al-Sharq al-Awsat newspaper.
The Islamists are fast squandering the public goodwill they earned since they ousted the hated warlords.
Liberal-minded Somalis feel uncomfortable with their puritanical creed. Islam in Somalia has traditionally been moderate, relaxed and tolerant.
But not only have the UIC's moral vigilantes raided cinema halls, but they have also stormed wedding parties and mixed-sex gatherings.
Petty traders are also unhappy with the high taxes imposed by the UIC. There have been protests, some bloody, in UIC-controlled towns such as Jowhar, north of the capital.
The honeymoon now appears to be over for the UIC. In Somalia's chaotic and fluid political landscape, a major backlash against the courts cannot be ruled out.