Al-Shabab fighters in Somalia have killed "scores" of African Union troops in an attack south of capital, Mogadishu, a spokesman for the armed group told Al Jazeera.
The attack in Janaale, in the country's Lower Shabelle province, early on Tuesday was confirmed by residents, but an exact casualty figure was not immediately available.
The assault involved the use of a car bomb, which breached the defences at an African Union Mission in Somalia (AMISOM) base in Janaale, residents told Al Jazeera.
Heavily armed fighters then stormed the based.
Witnesses said they counted more than 20 bodies at the site, according to the AFP news agency, but al-Shabab put the number at 50.
AMISOM released a statement on Tuesday condemning the attack on its base by al-Shabab.
"The AMISOM base at Janaale, Lower Shabelle Region in Somalia came under attack from al-Shabab militants today.
"The militants used a car loaded with explosives to trigger the attack and to facilitate their forced entry into the camp after which they engaged our soldiers in a gun-battle.
"Although our troops undertook a tactical withdrawal following the initial vehicle borne explosive attack, they have since consolidated and regained full control of the base," the statement said.
AMISOM disputed the suggestion the area was under the control of the fighters, and dismissed reports weapons had been looted from the base in a post on Twitter.
In July, al-Shabab claimed to have killed "dozens" of AMISOM troops at an outpost in Lego, about 100km northwest of the capital.
The attack on Lego also began with a suicide car bomb, followed by an assault by members of the armed group.
RELATED: Al Jazeera's coverage of al-Shabab in Somalia
Shortly after that attack, the group claimed responsibility for a car bombing near the Jazeera Hotel in Mogadishu, killing at least 10 people.
A day before the attack in the capital, US President Barack Obama said during his visit to Nairobi, in neighbouring Kenya, that while al-Shabab had been "weakened", the overall security threat posed by it remained .
Al-Shabab aims to overthrow Somalia's central government and establish a state based on its interpretation of Islamic law.
Source: Al Jazeera and agencies