The attack at Galgalato, 25km north of the city centre, occurred on the last day of a three-day deadline for residents of the coastal capital to hand in their guns or be disarmed by force.
Ahmed Hassan, a Mogadishu resident, said: "I won't do it. For 16 years this country has been in chaos. It would be suicide."
The country's police commander, who has only about 1,000 officers under his control, says that he is outgunned.
"The UIC may have brought peace for a while but what would have been the cost?"
Abluth, Portland, US
Send us your views
"I cannot say there is a viable police operation in Mogadishu," Ali Mohamed Hassan Loyan said.
Meanwhile, the Bakaara market in central Mogadishu is doing brisk business in weapons.
Only a handful of people have so far heeded the prime minister’s demand and turned in weapons. Twenty mercenary fighters turned in 20 small guns and a "technical" - a pick-up truck mounted with machine guns - on Wednesday.
Somalia's interim government issued the order after its forces, backed by troops, tanks and warplanes from neighbouring Ethiopia, routed fighters of the Union of Islamic Courts (UIC), which had brought some stability to much of the south during its six-month rule.
But Hussein Aideed, Somalia’s interior minister, said remnants of the Islamic courts still pose a threat in the capital.
"There are 3,500 Islamists hiding in Mogadishu and the surrounding areas and they are likely to destabilise the security of the city," he said.
Many Somalis say they resent the interim government as an Ethiopian puppet that is virtually powerless on its own.
Residents say they have also been scared by the reappearance of fighters loyal to a host of regional commanders chased out of Mogadishu by the Islamic courts in June.
Within hours of the courts fighters fleeing the city a week ago, many armed groups had taken up positions at checkpoints where they used to rob, rape and murder civilians.
Analysts say the rapid return of regional commanders shows how easily the city could slide back into the anarchy it has suffered since Mohamed Siad Barre was overthrown in 1991.
The government is trying to install itself in the capital, after breaking out from the provincial outpost of Baidoa, which had been threatened by the Islamic courts.
After leaving its final stronghold in southern Somalia on Monday, leaders of the Islamic courts rejected an amnesty offer and vowed to fight on using guerrilla tactics.
Government troops backed by Ethiopian fighter jets and helicopter gunships have been pursuing Islamic courts fighters in the scrubland between Kismayu and the Kenyan border.
|The UN says 4,000 Somalis fled to Kenya in the|
early days of fighting [AFP]
The United States, trying to block their escape and that of foreign fighters by sea, has deployed warships from a counter-terrorism force off the Somali coast.
The UN High Commissioner for Refugees (UNHCR) says 4,000 Somalis crossed the border during the early days of fighting.
Kenya has since intensified its security measures on the border and reinforced its troops to guard against any spill-over of the fighting.
As a result, thousands of people are stranded in the Somali town of Dhobley waiting to go through security screening and cross into Kenya.