Al Shabaab
Al Shabaab militants, like the ones in this photo, have attacked an African Union military base Getty

At least 30 people have been killed after gunmen attacked an African Union military base in Somalia.

The attack on the base in Leego, southern Somalia, has been claimed by Islamist group al-Shabaab, which claims that its fighters have taken control of the base and raised their black flag over it.

This has not been confirmed.

The BBC reports that 30 are believed to have been killed, with scores more injured.

The fighting was the heaviest ever around this area. "The al-Shabaab fighters took full control of the base and killed many soldiers," Alinur Mohamed, an village elder from Leego, told AFP.

The base was manned by 100 Burundian soldiers from the African Union Mission in Somalia (Amisom).

A suicide bomber reportedly drove into the main gates of the base on the main road connecting Mogadishu with Baidoa in the early morning. Fighting was still raging three hours later as militants armed with machine guns and RPGs attacked the base

Leego residents said that militants were burning vehicles, looting weapons and removing the bodies of the fighters.

Earlier, Amisom confirmed an attack was taking place.

"Amisom confirms there is an ongoing attack at their Somalia base that started this morning," the mission said on Twitter.

Al Qaeda-affiliated al-Shabaab is currently battling Somalian government forces backed by Amisom troops for control of the country.

The group previously pledged to step up its attacks during the Islamic holy month of Ramadan.