Somalia's Islamist Shebaab rebels pulled out of key positions in the war-torn and famine-struck capital Saturday, 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," President Sharif Sheikh Ahmed told reporters. Al Qaeda affiliated Shebaab 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," Sharif said. African Union-backed government troops have been battling Shebaab rebels in Mogadishu 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 Shebaab, 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 Mujahedeen fighters applied military tactic changes to undermine the allied enemy of Allah, and you will soon be hearing a good news." It was not immediately clear where the Shebaab had withdrawn to but they still control large areas of the south and centre of the country. Until Saturday morning, government and AU troops controlled just over half of Mogadishu, including the airport and port, while the Shebaab controlled the city's northeast. "The enemy is defeated, they pulled out of Mogadishu - and we will fight them to eliminate them from the rest of the country," Somalia's prime minister, Abdiweli Mohamed Ali, said. The Shebaab pullout will likely be a major economic blow to the rebels, whose control of Mogadishu's main Bakara and Suuqbaad markets have in the past netted the group up to $60 million annually through taxes, according to a UN report released last month. Since February, the AU mission in Somalia (AMISOM) with its 9,000 Ugandan and Burundian soldiers has clawed back key positions from the insurgents. Paddy Ankunda, a spokesman for AMISOM, said they were reacting cautiously to the Shebaab's move. "We're getting reports that they have pulled out from all their positions. We are still verifying," Ankunda said. "We're very, very cautious because it could be a trap." The Shebaab had for two years been promising to topple the Western-backed government in Mogadishu but always fell short of smashing its last defences despite a deadly and costly offensive.