According to Somali police, a bomber fist set off an explosives laden-car at the entrance of the AU base near the international airport in Mogadishu on Tuesday morning.
A second bomber then tried to storm the base, but he was shot and detonated, the officers added.
Local media said there were nine UN peacekeepers and three AU soldiers among the victims.
“AU forces sealed the area. There were many Somalis outside the gate and there were AU forces at the gate,” said police officer Major Nur Osman.
Witnesses at the scene heard gunfire after the two explosions.
The al-Qaeda-affiliated al-Shabab terror group has claimed responsibility for the attack.
The Takfiri terrorists have carried out a series of similar attacks in Mogadishu and elsewhere in the country in recent years as they continue their campaign to topple the government; Press TV reported.
218-11