The Somali transitional government is making moves to assert its authority over the capital Mogadishu, a day after its forces moved into the city.
Prime Minister Ghedi celebrates advances against the Islamists
Government members are talking to clan leaders about arrangements for taking over Mogadishu, which they have never been in charge of before.
PM Ali Mohamad Ghedi said martial law could be imposed in the country.
Correspondents question whether the government can maintain security if its Ethiopian backers leave.
There have been reports of gunfire and looting since Islamist forces left.
Meanwhile the United Nations refugee agency said at least 17 people died and 140 were missing after two boats packed with people fleeing the conflict in Somalia capsized in the Gulf of Aden.
They had been trying to offload their passengers in Yemen, but were spotted by the Yemeni coast guard, who opened fire.
As they tried to head back to sea, bad weather and the movement of frightened people on board caused the boats to capsize.
Mr Ghedi, who returned to his home village north of Mogadishu for the first time in four years, acknowledged the difficult task facing the government.
"This country has experienced anarchy and in order to restore security we need a strong hand, especially with freelance militias," he said.
He said the government was seeking parliamentary approval to impose martial law on Saturday.
Government forces, backed by Ethiopian troops, marched into parts of Mogadishu on Thursday, hours after the UIC abandoned the capital they had held for six months.
Residents in the north of the city reported cars and mobile phones being stolen after the UIC departure. Rising insecurity forced most businesses to stop trading, our correspondent said.
Some residents cheered the troops, but others feared a return to lawlessness.
It was not clear whether the Ethiopians were also entering the city, but Bereket Simon, special adviser to Ethiopian prime minister, told the BBC their troops were still on the outskirts.
Ethiopia's Prime Minister Meles Zenawi said his troops' mission was restricted to removing the threat of the UIC.
The UN estimates that about 30,000 people have been displaced during the fighting and causalities have been high.
""Hundreds of young people have been killed in the last few days," Eric Laroche, co-ordinator of the UN's civilian and humanitarian programmes in Somalia, told the BBC's Network Africa programme.
"There have been 800 people hospitalised from both sides, but particularly from the Islamic side."
Islamist fighters fled towards the port city of Kismayo, their last remaining stronghold, 500km (300 miles) to the south, pledging to fight on.
But the BBC's Africa analyst David Bamford says despite hints of a guerrilla war, the movement has been severely weakened.
Meanwhile, a UIC delegation has been in Nairobi, meeting Kenyan officials and Western diplomats.
The African Union has called for Ethiopian forces to leave Somalia. But the UN Security Council failed to agree on a statement calling for the withdrawal of all foreign forces.
The UIC has its roots in the north of Mogadishu. Courts administering Islamic law restored order in a city bedevilled by anarchy since the overthrow of former President Mohamed Siad Barre in 1991.
In parts of Mogadishu, life seemed to be going on as normal
The UIC assumed control of the capital in June, driving warlords out and rapidly extending their influence to much of southern Somalia - with the exception of Baidoa, the seat of the transitional Somali government.
That body, set up in 2004 after talks between Somali factions, has been unable to meet in the capital because of opposition first from warlords, then from the UIC.
Almost all Somalis are Muslim and after years of lawlessness, many were happy to have some kind of law and order under the UIC.
But some are wary of the hardline elements among the UIC.
The UIC have staged public executions and floggings of people they have found guilty of crimes such as murder and selling drugs.
UIC leader Sheikh Hassan Dahir Aweys is accused by both Ethiopia and the US of having links to al-Qaeda - charges he denies.