Hardline Islamist fighters from al-Shabaab chant slogans as they rally in the streets of Mogadishu on October 30, 2009 Getty Images

At least 10 Somali army troops and 12 al-Shabaab militants have been killed in clashes after the al-Qaeda linked group rammed a car packed with explosives into a base to the south-west of Mogadishu.

"Heavy exchange of gunfire continued for hours," Major Ahmed Farah told Reuters news agency, adding that at least 12 al-Shabaab fighters had been killed in ensuing exchanges.

Al-Shabaab has claimed as many as 30 Somali soldiers were killed in the clashes which were said to last several hours. The militant group often reports opposition casualties far higher than those cited by officials. There was no information of the number of al-Shabaab fighters killed given by spokesman Abdiasis Abu Musab.

On 10 July Somali authorities said they had destroyed an al-Shabaab military base used to store supplies just to the south of Mogadisgu without resistance.

Eighteen were killed and many more injured in the town of Lafoole, 240 miles from Mogadishu on 30 June. The explosion was triggered as a vehicle that drove over the incendiary device. Along with those inside, a number of other civilians, many of whom were vegetable vendors and pedestrians were killed.

On 25 June, a suicide bomber detonated a vehicle packed with explosives, outside the gates of a Mogadishu hotel. In a follow-up attack al-Shabaab gunmen then entered the premises and fired at civilians. As many as 15 people were killed and 25 injured in the assault.

Somalia has been devastated by civil war since 1991. Over the course of the fractious internal conflict the extremists took control of Mogadishu and vast swathes of the south of the country from 2006 until 2011.

Since al-Shabaab's defeat to African Union peacekeepers the militant group has targeted Somali and Kenya security forces both in Somalia and over the border. They have also carried out a series of bloody attacks at restaurants and clubs against civilians.