A Somali military official says dozens of Islamic extremists attacked two towns in southern Somalia early Saturday and clashed with government troops in which 18 militants and soldiers were killed.

Mohamed Abdullahi, a Somali military commander in Lower Shabelle region, said the fighting happened in Awdhegle and Mubarak towns and the militants were later repulsed. He gave no further details on the causalities.

Despite major setbacks in 2014, Somalia's al-Shabab rebels continue to wage a deadly insurgency against the Mogadishu government and remain a threat across East Africa.

In a separate incident, Somali police officer Capt. Mohamed Hussein said Saturday that suspected militants traveling in a car sprayed bullets on a car carrying two Somali legislators in the capital Mogadishu, seriously wounding one of them.