Somali government troops backed by African Union peacekeepers on Saturday recaptured the key port of Merka from Shebab insurgents, just one day after the Islamists swept into the city, the army and residents said.
"The Somali forces and AMISOM peacekeepers secured control of Merka again and now the situation has returned to normal," a Somali military official, Abdirisak Mohamed, told AFP by telephone from Mogadishu.
"There was brief exchange of gunfire, but the (Shebab) militants have fled."
He said "several" Shebab fighters and one Somali soldier were killed in the clashes, and "the security forces are now conducting clearing operations inside town."
A resident reached by telephone said the AU force, known by its acronym AMISOM, used tanks to recapture the port, and four civilians were killed after they were caught in the fighting.
"Four people died in our neighbourhood and two others were wounded, I can see AMISOM and Somali troops returned to the city now and they are conducting security operations", Muhidin Osman said.
Another resident, Shamso Moalim, said "Shebab fighters pulled out of the town after putting up slight resistance, the Somali forces and AMISOM are back".
"There are civilian casualties but I don't know the number", she added.
AU troops had fled the city, the state capital of Lower Shabelle, as heavily armed Shehab fighters swept in with black Islamist flags on Friday, residents and local authorities said, in one of the most dramatic reverses for the multi-national force in its nearly decade-long battle against the Shebab.
The historic port, some 100 kilometres (60 miles) south of the capital Mogadishu, was captured in August 2012 by African Union troops after four years under Islamist control.
The Shebab are fighting to overthrow the internationally-backed government in Mogadishu, which is protected by 22,000 AU troops.