Mogadishu: Three African Union soldiers and a civilian were killed Thursday after Shebab militants staged a brazen attack on the force`s heavily fortified headquarters in Somalia.
The AU force known as AMISOM said troops regained control of the base in Mogadishu after a gunfight that left five of the attackers dead while three others were captured.
"Three AMISOM soldiers and a civilian contractor unfortunately lost their lives," AMISOM said in a statement, updating earlier information that said the four had been injured in the Christmas Day attack.
The statement did not mention the nationalities of the victims, but a contingent of Ugandan soldiers is in charge of the base.
AMISOM said some of the attackers were wearing Somali national army uniforms when they "breached the base camp around lunch hour and attempted to gain access to critical infrastructure".
"AMISOM has regained control of the Halane base camp and restored normalcy. All African Union and United Nations personnel in the base camp are safe and secure," the statement added.
The Shebab group quickly claimed responsibility for the attack.
"Our fighters are inside the headquarters of the foreign troops in Somalia," Shebab spokesman Abdulaziz Abu Musab told AFP earlier on Thursday, adding that several AU soldiers had been killed.
A Western security source said between 15 and 20 attackers were involved in the assault.
Paddy Ankunda, the Ugandan spokesman for AMISOM, told AFP the assailants "sneaked into the base camp near the airport... but our troops foiled the attack."
He added on Twitter that the "attackers sneaked in incognito."
Somali police official Abdi Ahmed said loud explosions had resonated at the rear entrance to the Halam base, where exchanges of gunfire were also heard.
The AU force headquarters is a fortified structure located on the grounds of the Mogadishu airport, which is also under high security.
The AMISOM force, deployed since 2007, currently counts some 22,000 African Union troops.
They have managed to push Shebab militants out of the capital, but the Islamists still hold large swathes of territory.
Recent Shebab attacks in Somalia have targeted key government and security sites in an apparent bid to discredit claims by the authorities and African Union troops that they are winning the war.
Thursday`s attack came a day after Somalia`s parliament endorsed a new prime minister, appointed last week after the war-torn country`s president fell out with the previous premier amid bitter infighting.
The United Nations, United States and European Union -- all key backers of Somalia`s fragile government -- have warned that power struggles in Mogadishu were a damaging distraction for the country as it tries to battle the Shebab rebels.