A military base of the African Union Mission in Somalia (AMISOM) was attacked on Sunday by suspected militants from the Al-Qaeda-linked Al-Shabaab movement.
“Some of the shells hit the AMISOM compound, while others landed in the ocean,” he added.
He said the attacked base was the fortified Halane base in the Somali capital Mogadishu, by far the largest AMISOM military base in Somalia.
“This is the work of Al-Shabaab,” he added.
AA could not immediately reach AMISOM for comment.
It was not immediately clear whether anybody was killed or injured in the attack.
Somalia has remained in the grip of on-again, off-again violence since the outbreak of civil war in 1991.
Earlier this year, the country appeared to inch closer to stability after government troops and African Union forces – deployed in the country since 2007 – drove Al-Shabaab group from most of its strongholds.