At least two soldiers with the African Union force in Somali (AMISOM) have been killed in a suicide bombing attack on a peacekeeping base in the Somali capital, Mogadishu.

African Union (AU) and Somali officials said at least three attackers were also killed in the assault on Monday. 

The attackers, disguised as Somali government troops, were killed in the afternoon firefight after they assaulted a position guarded by AMISOM and pro-government militia.

"The extremists drove up in a white saloon car and engaged AMISOM troops there in a firefight. However, they were unable to gain entry into the position. Three of them were killed, including one would-be suicide attacker," AU forces said.

Captain Prosper Hakizimana of the African Union said that one suicide bomber was stopped when he was shot at by AU forces and immediately blew up, adding that casualties for that attack were unknown.

Fighters with links to al-Qaeda are battling the weak UN-backed government for control of the capital.

About 9,000 AU troops are stationed in the city to prevent the government from being overrun by anti-government fighters. The insurgency has frequently launched suicide attacks against both government and AU soldiers.

The government once controlled only a couple square kilometres near Mogadishu's seaside airport. AU officials say they now control half the city.

Source: Agencies