Somali government troops backed by Ethiopian soldiers have captured the last stronghold of the Union of Islamic Courts, the defence minister says.
Ethiopia was at the forefront of the drive against Islamists
Col Barre Aden Shire said the town of Ras Kamboni, in south-eastern Somalia, fell after several days of fighting.
Remnants of the militia are now reported to be hiding in dense forest along Somalia's border with Kenya.
Ethiopia has led a military campaign against the Islamists, who controlled much of Somalia for six months.
The US this week launched air strikes against Islamists, who they accuse of harbouring al-Qaeda members suspected of carrying out attacks against US embassies in East Africa.
The Islamists denied they were sheltering senior al-Qaeda operatives.
The US air strikes have been condemned by some regional powers, including Djibouti and Eritrea, and have been criticised by Oxfam for leading to apparently high numbers of civilian deaths.
"Government troops and Ethiopian forces have captured Ras Kamboni after heavy fighting," the defence minister told the Associated Press news agency.
As news emerged of the fall of Ras Kamboni, interim President Abdullahi Yusuf met warlords in Mogadishu in an effort to agree a pact.
Earlier, warlords who battled for control of Somalia for 16 years agreed to surrender their weapons after a clan gunfight left at least five people dead.
"The warlords and the government have agreed to collaborate for the restoration of peace in Somalia," said government spokesman Abdirahman Dinari following the talks in Somalia's presidential palace.
"The agreement means they have to disarm their militia and their men have to join the national army," he said.
He named the warlords who had agreed to disarm as:
- Mohamed Qanyare Afrah
- Musa Sudi Yalahwo
- Omar Mohamed Mohamoud
- Issa Batan Alin
- Abdi Hassan Awale Qeiybdid
- Omar Habeb
- Bashir Raghe Shirar.
They formed a US-backed alliance last year but were driven out of Mogadishu by the militants of the Union of Islamic Courts.
Aid workers report that more 1,000 people have been wounded since fighting erupted in December.