A suicide car bomb explodes near the gate of a military base in Afgoye before of president’s visit to the town.

At least three soldiers have been killed near Somalia’s capital, Mogadishu, in a suicide car bomb attack at a military base claimed by the al-Shabab armed group.

Sunday’s explosion took place near the gate of the base in Afgoye town, 30km south-west of Mogadishu, according to security officials and al-Shabab.

“Police and military fired at a speeding suicide car bomb today and it exploded in Afgoye district. So far, we know three soldiers died,” Captain Nur Ali, a police officer, told the Reuters news agency.

Al-Shabab claimed a higher death toll.

“A suicide car bomb targeted Somali forces who were deployed ahead of President [Mohamed Abdullahi] Farmaajo’s visit in Afgoye. We killed 11 soldiers,” Abdiasis Abu Musab, al-Shabab’s military operation spokesman, told Reuters.

Residents reported hearing a powerful explosion, followed by gunfire from the base.

Addow Isse, a resident in the town, said he saw at least three bodies lying in a pool of blood, according to The Associated Press news agency.

Colonel Ahmed Ali told AP that fatalities could increase from the 10 injured in the blast.

‘Three killed’ in Mogadishu

In a separate incident on Sunday, police said a car bomb parked in front of a restaurant at the busy street of Maka al-Mukaram in Mogadishu had exploded.

“A car bomb exploded at a parking in front [of] a restaurant,” Major Abdullahi Hussein, a police officer, told the Reuters news agency.

Abdikar Abdirahman, director of Amin ambulance services said: “So far, we have taken two dead people and seven others are injured.”

A Reuters witness said he saw three dead and the wreckage of three cars and an autorickshaw.

Earlier, Somali forces killed two fighters after a gun battle erupted briefly at a checkpoint in the capital, according to police.

“Somalia’s military killed two armed militants at Benadir checkpoint. Two soldiers were slightly injured in the exchange of fire,” Major Mohamed Abdullahi, a police officer, told Reuters.

Al-Shabab, which is fighting to overthrow Somalia‘s government, routinely stages attacks.

The group was pushed out of Mogadishu in 2011 by Somali troops backed by African Union soldiers.