By Joseph Winter
BBC News, Mogadishu
Immediately after the 9/11 attacks on the United States, Somalia was widely mentioned as a possible safe haven for Islamic terror groups, leading many Somalis to fear that their country would be invaded as part of the US-led war on terror.
This has not happened and instead 9/11 may have spurred some parts of the international community to intensify their efforts to set up a functioning national government in Somalia.
Sheikh Aweys denies terror groups operate in Somalia
One diplomat who deals with Somalia says that "dozens of Islamic terrorists" remain active in the country.
The United Nations says that Somalia was used as a transit point for those who carried out the 1998 attacks on the US embassies in Kenya and Tanzania, and the 2002 suicide bombing of an Israeli-owned hotel near the Kenyan resort of Mombasa.
Some of the weapons used in the attacks may also have been purchased in the open arms bazaar in the Somali capital, Mogadishu and those responsible for the attacks may have carried out their training on Somali territory, UN officials say.
Without any central authority, it is very difficult to know exactly what is and what is not happening in Somalia.
Further, there is no-one to stop a terror group from setting up in one of the country's many sparsely populated areas - as long as they have enough money and enough local links to smooth their passage.
"They are one of the biggest threats to the new government," which has been set up in neighbouring Kenya but which has still to return to Somalia, the diplomat says.
Others, including Winston Tubman, the United Nations special envoy for Somalia, say that they have seen no hard evidence of the presence of terror groups in the country.
But he says that the possibility that they could easily establish training camps in a lawless country is one reason why both western countries and Somalia's neighbours have increased the pressure on rival warlords to stop fighting and set up a central authority for the first time in 14 years.
The man chosen to lead that government, President Abdullahi Yusuf, has responded by publicly pledging to fight against terror groups in Somalia and he has a track record of doing just that.
When he was in charge of the semi-autonomous region of Puntland in north-eastern Somalia, he fought al-Itihad al-Islamiya, named as a terrorist group by the US and alleged to have links to al-Qaeda, and expelled them from his territory.
But Sheikh Hassan Dahir Aweys, one of al-Itihad's former leaders, vehemently denies the existence of terror groups, let alone training camps in Somalia.
"No-one here is fighting against the US," he says, insisting that he is merely a Muslim scholar, who believes that only Sharia law and Islam offer the solution to Somalia's problems.
A US anti-terror base is as close as it could be to Somalia
Sitting cross-legged on the floor, talking softly and calmly and often smiling through his red, henna-stained beard, he does not give the impression of someone who masterminds terror attacks when he is not talking to journalists or preaching at the mosque over the road from his house.
He moves around quite openly in Mogadishu, albeit in a convoy of armed guards, including a technical - a truck with an anti-aircraft gun mounted on the back. But in lawless Mogadishu, such extensive security is not exceptional for those who can afford it.
Mr Aweys readily agreed to be interviewed at his large, well-maintained house set down a labyrinth of dirt tracks in a middle class Mogadishu suburb.
However, he agrees with those who say that worldwide, Islam is under attack by the US and its allies and supports "the Mujahideen who are fighting back".
He accuses the US of paying Somali warlords to kidnap those it accuses of being terrorists and spiriting them out of the country.
He says that four people have been seized in this way - although he did not give their names and said that two were later released.
US officials said they had "no information" on these claims but most Somali-watchers accept they are true.
While the US has not sent any soldiers to Somalia, it has set up an anti-terror task force, of almost 2,000 men, in neighbouring Djibouti.
While there is no specific mention of Somalia in its mission statement, it can surely be no coincidence that this base is in a country just a few miles from the Somali border and where Somali is the main language.
Mr Aweys says that President Yusuf's pledge to crack down on terror groups is a ploy to ensure western aid and continued support for his government.
In November 2001, two months after 9/11, life for many Somalis became even harder when the country's largest money transfer firm - and telecoms company - al-Barakaat was closed down after the US accused it of helping to fund terror groups.
With cash and local support a terror group could thrive
This made it far harder for the huge Somali diaspora to send money back to their relatives struggling to survive at home.
Three years on, the war on terror could lead to an improvement in people's lives if it means that the West feels it is too dangerous to give up on Somalia and sticks with the long and tortuous peace process until there is once more a functioning national government.
Irrespective of whether there are terror groups in Somalia or whether people think Mr Yusuf would make a good leader, most Somalis are desperate for a return of some sort of national authority.
Even Mr Aweys says that if Mr Yusuf moves against those linked to al-Itihad but governs in the interests of the people, he would be happy, as long as no Islamic laws are broken.
"The good of the Somali people is more important than my personal interests," he said.