The Ethiopian troops stopped on the outskirts of town, after doing most of the fighting in an offensive that defeated the Islamic Courts militia, which had been backed by Iran and Hezbollah.
"We are in Mogadishu," Somali Prime Minister Mohamed Ali Gedi declared.
It remains to be seen how the interim government is able to deal with the various warlord clans.
Gedi's government was set up in 2004 with U.N. backing.
Ethiopian Prime Minister Meles Zenawi has said that his army would leave Somalia once it defeated the jihadis. He said that the war would continue until the Somali and foreign jihadi armies were destroyed.
"We need to pursue them to make sure that they do not establish themselves again and destabilize Somalia and the region," he said, predicting that would take a few more weeks.
Speaking in Ethiopia's capital, Addis Ababa, he said 2,000 to 3,000 Islamic fighters had been killed and 4,000 to 5,000 wounded, and that his forces had suffered minimal casualties.
The Islamic militiamen retreated toward the southern port of Kismayo. There they have reportedly been recruiting children as young as 12 to make a last stand for jihad, according to a confidential UN report.
The front lines are now in the town of Jilib, 65 miles north of Kismayo, where Islamic Courts leader Hassan Dahir Aweys arrived with his troops riding in 45 pickup trucks mounted with anti-aircraft guns.
Islamic leaders had declared a jihad against Ethiopia and had issued a call for foreign Muslims to join their "holy war" against the Ethiopians. Somalis living on the coast reported seeing hundreds of foreigners entering the country.
When Islamic troops advanced on the interim government's stronghold in Baidoa, Ethiopian troops and fighter aircraft went on the offensive and threw them back in disorder.
This can be seen, like the Hamas/Fatah struggle as a proxy war between the US and Iran, who was backing the Islamic Courts.