Somalia's Islamist Shebab rebels pulled out of key positions in the war-torn and famine-struck capital on Friday, with the country's president proclaiming the city "fully liberated."
"Mogadishu has been fully liberated from the enemy, and the rest of the country will soon be liberated too," Sharif Sheikh Ahmed told reporters.
The al Qaeda affiliated Shebab insurgents abandoned several strategic positions overnight that were then taken over by government troops.
"We are very happy -- the fruits of bloodshed and the wars that we fought against the rebels are finally attained," Ahmed said.
African Union-backed government troops have been battling Shebab rebels in Mogadishu in an offensive to secure aid delivery routes for victims of the drought threatening some 12 million people in Somalia and other Horn of Africa countries.
"We have two enemies to fight - one of them is the Shebab, while the other is those who try to rob the people," the president said.
"We will not tolerate looting, and anyone found committing such a crime will be brought to justice."
Lawless Somalia is awash with rival militia factions. On Friday, food aid being handed out to famine victims in Mogadishu was looted by gunmen, who killed five people.
However, a spokesman for hardline rebels, Ali Mohamed Rage, said Saturday's withdrawal involved merely "a change of military tactics."
"The Mujahideen fighters applied military tactic changes to undermine the allied enemy of Allah, and you will soon be hearing a good news."