By Abdi Sheikh

MOGADISHU (Reuters) - African peacekeeping troops and Somali forces recaptured a southern town from Islamist al Shabaab rebels on Saturday, bringing them a step closer to the insurgent stronghold of Barawe, commanders said.

The assault was part of the second phase of an offensive launched earlier this year to drive the rebels out of towns which they have continued to hold since losing control of the capital Mogadishu in 2011.

Al Shabaab ruled most of the southern region of Somalia from 2006 until 2011 when African troops marched into the capital. African and Somali forces have regained several towns this year, but rebels still hold other centres and tracts of countryside.

"We secured Bulamareer town today. We have chased the al Shabaab and the operation will continue until its goals of securing the entire country is achieved," Abdirizak Khalif, Somalia's deputy military commander, told Reuters.

He did not give casualty figures, but a spokesman for the African Union force AMISOM, Colonel Ali Aden Houmed, said a Ugandan soldier was killed and two soldiers wounded. He said many rebels were killed but was not able to give a number.

Bulamareer lies about 80 km (50 miles) north of Barawe port, a major al Shabaab stronghold.

AMISOM's Houmed said Barawe was "one of our objectives" but said AMISOM and Somali forces had other targets on the way to Barawe that had to be dealt with first.

The rebels, which continue to stage hit-and-run gun and bomb attacks in the capital and across the country, acknowledged that their fighters had pulled out of the centre of Bulamareer.

"After a serious fight with AMISOM and government forces inside Bulamareer town we went to the fringes of the town, but we shall keep up attacks and battles," Sheikh Abdiasis Abu Musab, al Shabaab's military operations spokesman, told Reuters.

He claimed 18 African soldiers were killed and three of their vehicles burned, but made no mention of rebel casualties.

Story continues

Even as they have lost ground, the Islamist group which wants to impose its own strict version of Islam on the Horn of Africa nation has continued to harass African and government forces and blocked aid supply routes to towns they have lost.

Government officials have admitted that centres they have regained have often turned into "ghost towns" because many people flee as food and other supplies run out. Houmed said the new offensive aimed to prevent a repeat of this scenario.

The assault on Bulamareer began before dawn on Saturday. Many residents had fled before the assault began as AMISOM and the Somali forces had warned of an imminent attack, Houmed said.

Earlier this week, the joint African and Somali force retook another town, Teyeeglo, which lies in the Bakool region, which lies northwest of Saturday's fighting and near the Ethiopian border. That offensive involved Ethiopian forces.

AMISOM is a 22,000-strong African Union force that includes troops from Ethiopia, Kenya, Uganda, Burundi and Sierra Leone.

(Additional reporting by Feisal Omar; Writing by Edmund Blair; Editing by Stephen Powell)