Somali government troops rolled into Mogadishu unopposed on Thursday, the prime minister said, hours after an Islamic movement that tried to establish a government based on the Quran abandoned the capital and promised to make a stand in southern Somalia. "We are in Mogadishu," Prime Minister Mohamed Ali Gedi said after meeting with clan leaders to discuss the hand over of the city. "We are coordinating our forces to take control of Mogadishu." Gedi was welcomed to the town of Afgoye by dozens of traditional leaders from Mogadishu and hundreds of government and Ethiopian troops who have been fighting more than a week against the Islamic militia that had at one point taken over most of southern Somalia. The Islamic movement's retreat early Thursday, which its leaders called tactical, was followed by looting by clan militiamen, a chilling reminder of the chaos that had once ruled Mogadishu. One resident said three men and a woman had been killed in the looting. Gunfire could he heard in many parts of the city. Ethiopian Prime Minister Meles Zenawi vowed to inflict total defeat on the Islamic movement, saying the that he hoped the fighting would be over "in days, if not in a few weeks." "Forces of the transitional federal government and Ethiopia are on the outskirts of Mogadishu now," he told reporters in Ethiopia's capital, Addis Ababa. "We are discussing what we need to do to make sure Mogadishu does not descend into chaos. We will not let Mogadishu burn." Mogadishu's clan leaders, though, have the greatest influence over whether order or lawlessness follows the retreat of the Islamic movement known as the Council of Islamic Courts. President Abdullahi Yusuf said in a statement Thursday afternoon that his troops were not a threat to the people of Mogadishu. "The government is committed to solving every problem that may face Somalia through dialogue and peaceful ways," the statement said. Mohamed Jama Furuh, a former warlord and current member of parliament, claimed control of the capital's seaport on behalf of the government at midday on Thursday. His militia had controlled the port before Islamic forces took over. "The port is now in my hands. I want to provide security and protect it from looting ... until we hand it over to any other administration," Furuh told the Associated Press by telephone. Abdirahman Janaqow, a top leader in the Islamic movement, said he had ordered his forces out of Mogadishu to avoid bloodshed in the capital. "We want to face our enemy and their stooges ... away from civilians," Abdirahman Janaqow said in a telephone interview. Yusuf Ibrahim, a former Islamic movement fighter who quit Thursday, said only the most hardcore fighters were still opposing the government and its Ethiopian backers. He numbered them at about 3,000, and said they were headed to the port city of Kismayo, south of Mogadishu, which the Islamic forces captured in September. Ahmed Ali Harare, the military commander for the region, told the AP they would not quit Kismayo without a fight. Witnesses reported seeing a large number of foreign fighters in the convoys heading south. Islamic movement leaders had called on foreign Muslims to join their "holy war" against Ethiopia, which has a large Christian population. Hundreds were believed to have answered the call. Islamic fighters have gone door-to-door in Kismayo, recruiting children as young as 12 to make a last stand on behalf of the Islamic courts, according to a confidential UN situation report citing the families of boys taken to the frontline town of Jilib, 110 kilometers (65 miles) north of Kismayo. Residents told the AP Islamic leader Hassan Dahir Aweys had arrived in Jilib with hundreds of fighters in 45 pickup trucks mounted with anti-aircraft guns. In Iraq, an insurgent group linked to al-Qaida in Iraq urged Muslims to support the Islamists in Somalia who were abandoning the capital Thursday and fleeing government forces, according to an Internet statement. The so-called Islamic State of Iraq - a coalition of Sunni insurgent groups, chief among them al-Qaida in Iraq - said all Muslims should "stand by the side of their brothers in Somalia and to support them financially, with weapons and men and with prayers." The Islamic movement took Mogadishu six months ago and then advanced across most of southern Somalia, often without fighting. Then Ethiopian troops went on the attack in support of the government last week. Before the Islamists established control, Mogadishu had been ruled by competing clans who came together to support the Islamic courts. Now, the clans could return to fighting one another and may reject the government's authority. Somalia's complex clan system has been the basis of politics and identity here for centuries. But due to clan fighting, the country has not had an effective government since 1991, when clan-based warlords overthrew a dictator and then turned on one another. Two years ago, the United Nations helped set up the interim government. It had been unable to assert much authority, in part because it has been weakened by clan rivalries. The International Committee of the Red Cross said that over the past few days, hospitals and other medical facilities in southern and central Somalia have admitted more than 800 wounded people. "The ICRC is extremely concerned about civilians caught up in the fighting, wounded people and people detained in connection with the fighting," said Pascal Hundt, head of the ICRC's Somalia delegation.