AU spokesman Cornell Ali Aden Haamud told dpa that all of the eight al-Shabaab fighters who had stormed the base near Mogadishu airport on Thursday had died.
Several of them blew themselves up while others were killed in fighting with AU troops.
Five AU soldiers and a foreign civilian contractor were also killed, Haamud said.
"The situation is very good and under full control of our troops," the spokesman said.
A suicide bomber on Thursday rammed his car through one of the gates, followed by several other suicide bombers who detonated explosives they carried in their jackets, according to security officials and witnesses.
The ensuing gun battle lasted for more than two hours.
Al-Shabaab spokesman Sheikh Mohamud Rage told pro-insurgent radio Andalus that more than 17 AU soldiers had been killed.
He said the attack was an act of vengeance for the death of al-Shabaab leader Ahmed Godane in a US drone strike in September.
The African Union has about 22,000 soldiers helping the government fight al-Shabaab in the Horn of Africa country.
Somalia's conflict with al-Shabaab has lasted nearly a decade, claiming thousands of lives.