Government troops in Somalia have marched into parts of Mogadishu, hours after Islamist forces abandoned the capital they had held for six months.
The speed of the government's advance has surprised observers
"We are in Mogadishu," Prime Minister Mohamed Ali Ghedi said. "We are co-ordinating our forces to take control of Mogadishu."
Some residents cheered the troops, but others feared a return to lawlessness.
It was not clear whether Ethiopian troops, who had backed the government forces, were also entering the city.
Earlier, as the Union of Islamic Courts (UIC) withdrew its fighters, Somalia's clan militias began reasserting their presence - raising fears of a return to the clan warfare which racked the city for years before the Islamists brought a measure of security.
The BBC's Mohammed Olad Hassan, in the city, said clan militiamen seized key buildings - like the airport and old presidential palace.
Residents in the north of the city reported cars and mobile phones being stolen. Rising insecurity forced most businesses to stop trading, our correspondent said.
Meanwhile, the UN refugee agency said at least 17 people had died and 140 were missing after boats carrying those fleeing Somalia for Yemen capsized in the Gulf of Aden.
'Peace, law and order'
Prime Minister Ghedi is in the township of Afgoye, 20km (12 miles) west of Mogadishu, where he was meeting elders from the capital.
Transitional government spokesperson Abdirahman Dinari told the BBC the majority of the forces poised to retake Mogadishu were Somali, not Ethiopian.
He added: "The government is committed to restore law and order and to implement institutions."
In Ethiopia, Prime Minister Meles Zenawi said: "Our mission in Somalia is very very limited... we are not there to reconstruct Somalia economically, politically or otherwise. We are there to remove the threat of the Islamic Courts militia on Somalia and Ethiopia."
Mr Zenawi said his forces may have killed between 2,000 and 3,000 rival Islamist fighters, but there was no independent confirmation of the figures.
Correspondents are questioning whether the Somali government, which has never been in charge of Mogadishu before, can maintain security if their Ethiopian backers decide to leave.
Islamist fighters fled towards the port city of Kismayo, their last remaining stronghold, 500km (300 miles) to the south.
Senior UIC official Omar Idris told the BBC: "We know what happened in Iraq... I think this is very, very early to say that the Islamic Court forces were defeated."
In parts of Mogadishu, life seemed to be going on as normal
Meanwhile, a UIC delegation has been in Nairobi, meeting Kenyan officials and Western diplomats.
At the weekend Ethiopia began a major offensive to support the weak government against the UIC - which previously held much of central and southern Somalia.
The Red Cross says it is extremely concerned about civilians caught up in the fighting.
The African Union has called for Ethiopian forces to leave Somalia. But the UN Security Council has 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.
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.