MOGADISHU, Somalia, Feb. 23 -- Somali government troops and their Ethiopian allies used tanks and heavy artillery Friday to battle gunmen who struck a military base at the former defense ministry in Mogadishu.

At least three civilians were killed by stray bullets and in retaliatory fire as the violence spilled over into nearby neighborhoods.

"The government soldiers and Ethiopians fired back using heavy artillery as well as tanks," said a resident who declined to give his name for fear of reprisal. "The fighting continued for close to 20 minutes."

Houses in the area were struck by bullets and shells as government forces and a vigilante group fired back at attackers, witnesses said.

The interim government and its Ethiopian allies have been attacked almost daily by unidentified gunmen in the seaside capital of this Horn of Africa country. They attribute the attacks to a hard-line Islamic movement they drove out of Mogadishu and southern Somalia in a two-week offensive late last year.

The Islamic fighters, who ruled much of southern Somalia for six months until they were defeated in early January, have vowed to mount an insurgency.

The interim government, formed two years ago in Kenya, represents the 14th attempt to establish central rule in Somalia since 1991, when dictator Mohamed Siad Barre was ousted.

The government is awaiting the deployment of African Union peacekeepers to replace Ethiopian troops and help stabilize the country.

Uganda said Friday it was ready to send 1,500 troops to join the force's vanguard but was awaiting finalization of its mandate from the pan-African body and planes promised by Algeria to airlift soldiers and their gear.

"We will be leaving very soon," said Ruth Nankabirwa, Uganda's deputy minister for defense.

Soldiers from Nigeria, Ghana, Burundi and Malawi are also expected to join the proposed 8,000-member peacekeeping force, which the U.N. Security Council authorized Tuesday.