MOGADISHU (Reuters) - Al Shabaab fighters detonated a suicide car bomb before storming a military base in the south of Somalia on Monday and killing 27 soldiers, the militant group said, its second strike on the base in as many months.

Fighting broke out between al Shabaab and the national army shortly afterwards, resulting in the army killing 87 militants, assistant information minister Aden Isak Ali told a state news agency SONNA on Monday.

The attack, whose blast was heard by residents of a nearby town, follows a strike last month by al Shabaab on the base in Baar Sanguni, about 50 km (31 miles) from the port city of Kismayu, that wounded seven soldiers.

The group is battling to topple the central government and impose its rule based on its own strict interpretation of Islam’s sharia law. It has killed thousands of Somalis and hundreds of civilians across East Africa in a decade-long insurgency.

“We first attacked the base with a suicide car bomb and then stormed,” said Abdiasis Abu Musab, al Shabaab’s spokesman for military operations. “We killed 27 soldiers and took the base. Some soldiers fled into the jungles.”

The military sent reinforcements to the base following the reports of an explosion and heavy fighting after the rebel attack.

“The national army defended itself and killed 87 militants,” Ali said, adding the army pursued other militants into the jungles nearby.

Residents of the town of Jamame, 70 km (44 miles) away from Kismayu, said they heard the blast, followed by gunfire.

“We heard a huge blast after early morning prayers. Then heavy exchange of gunfire followed. It was in the direction of Baar Sanguni,” Osman Abdullahi told Reuters.