An Islamist militia says it has seized Somalia's capital, Mogadishu, after weeks of fighting against an alliance of warlords allegedly backed by the US.
The Islamic Courts have become increasingly powerful
The warlords have controlled the capital since they toppled Somalia's last effective government 15 years ago.
Talks are taking place with fighters still loyal to the warlords, Union of Islamic Courts officials said.
Interim Prime Minister Ali Mohammed Ghedi says his government wants to begin dialogue with the group.
Earlier, Mr Ghedi sacked four powerful Mogadishu-based warlords who had been serving as ministers.
Nine of the 11 Mogadishu-based warlords have now left the city, reports the BBC's Mohammed Olad Hassan.
The four sacked ministers include Security Minister Mohammed Qanyare Afrah and Trade Minister Muse Sudi Yalahow who over the weekend lost control of their Mogadishu strongholds.
Most of Mr Qanyare Afrah's fighters have joined the Islamic militia, but Mr Sudi Yalahow and his commanders remain in the capital and are locked in talks over their next move.
This year's clashes in the capital have been the most serious for more than a decade, with some 330 people killed and about 1,500 injured in the past month.
In a statement read over local radio stations, the Union of Islamic Courts leader Sheikh Sharif Sheikh Ahmed said the control of Mogadishu by warlords was over and he urged residents to accept the new leadership.
"The Union of Islamic Courts are not interested in a continuation of hostilities and will fully implement peace and security after the change has been made by the victory of the people with the support of Allah," he said.
"This is a new era for Mogadishu," he told AFP news agency, adding that the Islamic Courts were ready for dialogue.
Local people in Mogadishu gave a cautious welcome to the news.
"They said they would work with residents to improve security in the capital," city resident Ali Abdikadir told Reuters news agency.
"This is good news for us because the warlords were always engaged in battles. We are looking forward to a life without fighting."
Sharia law concerns
But some seemed unconvinced that the weeks of bloodshed were really over.
"It's good to see conflict resolved but I don't want to celebrate a temporary victory," housewife Hawa Ismail Qorey told AFP. "Mogadishu is witnessing political history but it may be good or it may be bad."
And others expressed concern about what the future might hold with Islamists who want to introduce Sharia law in control.
"What I am afraid of is if they interfere with the education system and bring religion by force to the schools," Asha Idris, a mother of five, told AFP.
On Saturday, UN aid workers pulled out of Jowhar, some 90km (56 miles) north of Mogadishu, in case the fighting spread there.
The violence began earlier this year when warlords who had divided Mogadishu into fiefdoms united to form the Anti-Terrorism Alliance to tackle the Islamic Courts, who they accused of sheltering foreign al-Qaeda militants.
The Islamic Courts deny this. They were originally set up in Mogadishu as a grassroots movement by businessmen to establish some law and order in a city without any judicial system.
The head of the BBC's Somali service described the rise of the Islamic Courts as a popular uprising.
The Islamic Courts have long said the warlords in the Anti-Terror Alliance were being backed by the US.
Washington merely says it will support those trying to stop people it considers terrorists setting up in Somalia but stresses its commitment to the country's transitional government, which functions from Baidoa, 250km (155 miles) north-west of the capital.
President Abdullahi Yusuf had urged the US to channel its campaign against Somalia's Islamists through his government, rather than the warlords.