Somali Islamist militiamen have fled the southern port city of Kismayo - their last major stronghold.
Ethiopian troops are advancing cautiously towards Kismayo
The prime minister said the city was now controlled by the Ethiopian-backed transitional government.
The retreat from Kismayo is seen as a major reversal for the Union of Islamic Courts (UIC), a militia that swept through much of Somalia last year.
A large-scale intervention by Ethiopian troops has helped the government seize UIC-held ground over the past week.
The Islamists had withdrawn to Kismayo on Thursday, after abandoning the capital Mogadishu as a result of heavy fighting involving Ethiopian artillery, tanks and aircraft.
But early on Monday, Somali Prime Minister Ali Mohamed Ghedi told AFP news agency: "Kismayo is already in the hands of the government. The Islamists have run away."
The prime minister said they were still "mopping up operations".
He added that the number of deaths had not yet been counted, but stressed there were "no big casualties".
Some 3,000 Islamist fighters were believed to be in Kismayo, about 300km (185 miles) south-east of the capital, Mogadishu.
Their retreat follows fierce fighting with Ethiopian troops around Jilib, 100km north of Kismayo.
Somalia's interim government vowed to pursue the Islamists. However, reports say Ethiopian forces are advancing cautiously, fearing mines and booby traps.
The militias are reportedly retreating south towards the border with Kenya, where security has been re-enforced on the Kenyan side in an effort to prevent them from crossing over.
On Sunday Kenyan President Mwai Kibaki announced he was calling a summit of East African countries to discuss the situation.
An Islamic commander, Sheikh Yaqub Ishak, confirmed his forces had left Kismayo, but said they would not "stop fighting the Ethiopian invader".
Ethiopian aircraft and artillery are backing Somalia's government
The Islamists have rejected offers of talks with the government, saying Ethiopia must withdraw its forces first.
Ethiopian troops officially entered Somalia on 24 December, joining fighters loyal to Somalia's interim government, to repel an Islamist assault on the government stronghold of Baidoa.
Ethiopia accuses the UIC of harbouring al-Qaeda militants. This is denied by the militia, which was set up to restore order in Mogadishu.
The UIC assumed control of the capital in June, driving warlords out and rapidly extending its influence to much of central and southern Somalia.
Some analysts say the UIC's popularity stemmed from its ability to transcend the clan enmities that have bedevilled Somalia since the overthrow of former President Mohamed Siad Barre in 1991.
The UN estimates that about 30,000 people have been displaced during the fighting, and casualties have been high.