By Joseph Winter
The Islamists are the first group to control Mogadishu in 15 years
Since the 11 September attacks on the United States more than four years ago, Somalis have feared that their lawless country could become the setting for a battle between US-backed anti-terror forces and al-Qaeda sympathisers.
That prospect now seems more likely than ever.
An Islamist militia has taken control of the capital, Mogadishu, from an alliance of warlords widely believed to be backed by the US.
The US refuses to confirm or deny these reports but President George W Bush says he is concerned by the Union of Islamic Courts' victory.
"The first concern, of course, is to make sure that Somalia does not become an al-Qaeda safe haven - it doesn't become a place from which terrorists can plot and plan," he said.
The union's chairman, Sheikh Sharif Sheikh Ahmed, has given conflicting signals since taking control in Mogadishu.
He sent a letter to foreign diplomats claiming that his followers do not sponsor terrorism and they have no plans to establish an Islamic state in Somalia.
A US anti-terror base is as close as it could be to Somalia
But he has also been quoted as telling the Saudi-owned pan-Arabic daily Asharq al-Awsat:
"If US forces intervene directly against us in Mogadishu, then we are ready to teach them a lesson they will never forget and repeat their defeat in 1993."
He was referring to the US humiliation in 1993, when 18 US troops and hundreds of Somalis were killed before the US pulled out its forces.
Fresh from defeating the hated warlords who have razed Mogadishu to the ground in 15 years of fighting, the Islamic courts are very popular in the capital.
The US is still mistrusted because of its 1993 debacle and its self-proclaimed "war on terror".
Reports that they were funding the warlords have not helped either side win over Somali popular opinion.
Some Somalis back the Islamic Courts for doing something to establish law and order in a country where the law of the gun has long held sway.
But the warlords, and others, say the Islamists are also behind a series of targeted assassinations of prominent figures, including a peace activist and senior military officials.
Many of the Somalis killed are those who had argued in favour of a foreign peacekeeping force in Somalia - an idea strongly rejected by the Islamists.
The warlords further accuse the courts of sheltering foreign Islamic fighters.
Western diplomats have long said that Somalia was home to training camps for Islamic radicals.
A Somali link has been assumed in the four al-Qaeda-linked attacks in East Africa - the 1998 bombings of US embassies in Kenya and Tanzania and the 2002 attacks on Israeli tourists in Kenya.
In a country without a government, a group with enough money can do just about anything it wants.
Weapons are easily available in Mogadishu's arms bazaar and anyone can buy a passport, although these are no longer recognised in the west.
One of the key figures in the Islamic courts and former al-Itihaad al-Islamiya leader, Sheikh Hassan Dahir Aweys - on the US list of terror suspects - denies the existence of training camps in Somalia.
But he told the BBC News website he has sympathy for the "Muhajadeen who are fighting back" against attacks by the US and their allies around the world.
Last year the International Crisis Group, a political think-tank, reported that: "In the rubble-strewn streets of the ruined capital of this state without a government... al-Qaeda operatives, jihadi extremists, Ethiopian security services and Western-backed counter-terrorism networks are engaged in a shadowy and complex contest waged by intimidation, abduction and assassination."
Sheikh Aweys denies terror groups operate in Somalia
The Ethiopians are extremely wary of radical Islam in the region and helped battle al-Itihaad in the 1990s.
They may well be happy to work with the US against the Islamic courts and a US anti-terror task force is conveniently based just over the border in Djibouti.
However, even some western diplomats in the region are critical of US policy, which they fear could scupper the prospects of peace in Somalia, by antagonising the first group to secure the whole of Mogadishu in 15 years and which enjoys considerable popular support.
Somali analysts argue that the best way to stop Somalia becoming a base for international Islamic fighters would be for a single government to reassert control of the whole country.
The Islamic courts now seem set to play a key role in the peace process, from which they have previously been excluded - if the US gives them the time to talk to the transitional government.