President Hassan Sheikh Mohamud has declared "total war" against the group. / Photo: AA

Somali President Hassan Sheikh Mohamud has said that a military offensive against al Shabaab aims to eliminate the al Qaeda-linked group in the next five months.

But security experts have questioned the timeline amid persistent attacks in the East African country by the militants.

Mohamud plans to officially launch the second phase of the campaign in coming days from the central town of Dhusamareb, where thousands of troops are gathering before being deployed to the frontlines.

The first phase began in August last year, with the military rallying behind clan-based militias in central Somalia.

That rare collaboration helped produce the most significant territorial gains against the militants since the mid-2010s, but al Shabaab has continued to stage deadly attacks against military and civilian targets.

Second phase

The second phase is meant to push into southern Somalia, the traditional stronghold of al Shabaab, which has been waging a brutal insurgency against the government since 2006.

"We want to eliminate al Shabaab from the country in the coming five months," Mohamud said at a town hall meeting in Dhusamareb on Thursday evening.

"If we do not clear them out completely, then maybe there will be few pockets with a few harmless al Shabaab that cannot cause problems."

Security analysts are sceptical of vows to eradicate the group, saying it has deep roots in communities across the country, while government forces have limited experience and capacity.

The militants have moved back into some rural areas that government forces captured during the first phase and have inflicted heavy losses on their enemies.

They killed at least 54 Ugandan peacekeepers in a raid in May, and at least 30 Somali soldiers in July in a suicide attack on a military academy in the capital Mogadishu.

AFP