"From our side, four died and six others were injured. Innocent civilians were also
injured," he said.
Hospital sources said 55 people injured in the fighting were admitted.
Al-Shabaab and allied groups control much of southern and central Somalia and want to impose their version of sharia (Islamic law) in the country.
Fighters launch frequent attacks on government targets and African Union peacekeepers.
Since Somalia descended into civil war in 1992, more than 15 transitional governments have come and gone but violence has persisted.