Somali government troops backed by African Union forces have captured a key stronghold of al-Shabab Islamists, local officials say.
The regional governor told the BBC he was in the centre of Barawe, about 200km (125 miles) south of Mogadishu.
The AU says al-Shabab, who had held the town for six years, used it as a base to launch attacks on the capital.
Residents said many of the al-Qaeda-aligned militants had begun withdrawing from the key port town on Friday.
"The situation is calm, the militiamen had fled before the forces reached the town," regional governor Abdukadir Mohamed Nur said.
Al-Shabab has lost control of several towns in the past month, but still controls large swathes of territory in rural areas.
The group, which is estimated to have at least 5,000 fighters, wants to overthrow the UN-backed Somali government and has imposed a strict version of Sharia in areas under its control.
Last week, a woman was stoned to death in Barawe for alleged adultery.
Correspondents say al-Shabab tends to tactically withdraw from areas when faced with a large offensive, but leaves some fighters within the civilian population to launch attacks later.
Various armed groups have been battling for control of Somalia since the overthrow of long-serving ruler Siad Barre in 1991.
The 22,000-strong African Union force was deployed in 2007, with most of its troops coming from Uganda and Burundi.
The situation in Somalia has improved in recent years, with thousands of Somalis returning from abroad to help rebuild the country.
Al-Shabab was forced out of Mogadishu in 2011 but still stages frequent attacks on the city.
(BBC)