MOGADISHU (Reuters) - Somalia troops have captured a southern town from al Shabaab insurgents, the president said on Thursday, the latest blow to the rebel group which has been forced out of swathes of territory over the past two years.

Somalia's army soldiers make their way to the town of Barawe during the second phase of Operation Indian Ocean October 5, 2014. REUTERS/Feisal Omar

The militants described the withdrawal from Baardheere, which lies about 300 km (190 miles) east of Mogadishu, as a tactical retreat.

Because of its hills in the outskirts, Baardheere has been the main stronghold of al Shabaab in the region since 2009 and has been a target for drone strikes on al Shabaab leaders.

Somali troops and African Union Mission in Somalia (AMISOM) peacekeepers have been fighting al Shabaab to wrest control from areas it holds in central and southern Somalia over the past weeks.

Al Qaeda-linked al Shabaab, which wants to topple a Western-backed government and impose its own strict interpretation of Islam on Somalia, has been driven out of major strongholds by the African and Somali forces but continues to launch bomb and gun attacks against officials and politicians.

“Our Somali National Army, supported by our partners in arms, yesterday secured one of the few remaining hideouts of al Shabaab, the great city of Baardheere,” President Hassan Sheikh Mohamud said in a statement.

“Let there be no doubt anymore, the fight to secure our country may be hard, but my commitment and those of our partners, and the resilience of this nation has never been stronger.”

Al Shabaab said the group’s fighters withdrew as a tactical measure and would return.

“We had been in Baardheere district for years but we have abandoned for tactics. The district is now in AMISOM hands,” sheikh Abdiasis Abu Musab, al Shabaab’s military operation spokesman, told Reuters.

“However, rest assured, they will never rest and one day Baardheere will return to our hands. We are not far - we are just on the edges of the town.”

On Wednesday, Kenya Defence Forces said its troops - part of AMISOM - had captured a bridge linking the road to Baardheere Bridge, a gateway to Gedo region, which it said was vital to al Shabaab transporting weapons, fighters and contraband goods.

KDF said it killed 24 al Shabaab fighters in the process of capturing the bridge.