"They launched an offensive on a military base at El-Adde and there was heavy fighting which caused casualties," Somali army colonel Idris Ahmed said, adding a Shebab suicide commando blasted a way into the base in the Gedo region, which borders Kenya and Ethiopia.
Both Somali troops and Kenyan soldiers with the AU force, AMISOM, are deployed at the isolated base.
"There was suicide attack followed by the fighting and it seems that the base was stormed," Ahmed said.
"The mujahedeen fighters carried out a successful operation this morning on a military base at El-Adde, and they have killed many of the Christian soldiers from Kenya," Musab said. "We have counted 63 dead bodies inside the base."
More From This Section
The Shebab frequently exaggerates the number of troops they kill, while AMISOM rarely gives exact tolls.
"Somalia is no longer a failed state," Mohamud said in a statement, which made no reference to the attack. "Somalia is building a strong foundation to support a better future."
Kenya's defence ministry confirmed there had been "casualties" but was unable to confirm numbers, describing the assault as an "unfortunate incident".
Kenyan military spokesman David Obonyo said the army "is doing all it can to consolidate the situation in the shortest time possible," without giving further details.
"We don't know about the casualties, but people who went there saw many dead bodies strewn around," he said, having spoken to those who went to the base.
The Shebab, fighting to overthrow Somalia's internationally-backed and AU-protected government, has launched a string of similar attacks.
In September 2015, Shebab fighters stormed a Ugandan AMISOM base in Janale district, 80 kilometres southwest of Mogadishu in the Lower Shabelle region.
And in June, Shebab killed dozens of Burundian soldiers when they overran an AMISOM outpost northwest of Mogadishu.