The most powerful warlords in Somalia's capital, Mogadishu, have agreed to set up a united force, which they say will restore security to the lawless city.
The militiamen will be retrained as a security force, the warlords say
They say they will start withdrawing some of their battle wagons and gunmen from the city by the end of the week.
The BBC's Hassan Barise, just back from Mogadishu, says this is a big step forward in the peace process.
However, some rival members of the exiled government fear that the new force could be used against them.
The Mogadishu warlords are opposed to a peacekeeping force, with the proposed inclusion of Ethiopian troops proving controversial.
A group of MPs based in exile in Nairobi has accused neighbouring Ethiopia of smuggling weapons into Somalia in violation of a United Nations arms embargo and sending troops across the border.
They warn the new weapons could lead to the resumption of fighting in Baidoa - a possible alternative site for the government to be based in if Mogadishu remains too dangerous.
Ethiopia has denied the allegations.
Like the entire country, Mogadishu is divided between rival warlords, whose gunmen can be seen operating roadblocks on many street corners, where they demand money from commercial vehicles.
Somalia has not had a functioning national government since 1991, when Siad Barre was ousted.
A government has been formed in neighbouring Kenya but it says Mogadishu is too dangerous for it to return to.
Our correspondent says this is the first time that the rival Mogadishu warlords, who have been bitter enemies for many years, have agreed to work together.
He says they want to show that the capital is safe enough for the government to set up there.
The new force will dismantle the roadblocks and end banditry, say the warlords, who are all ministers in the new government.
Warlords Mohammed Qanyare Affra, Osman Ali Atto and Muse Sudi Yalahow have agreed on what proportion of the new force each will contribute.
The position of the other main Mogadishu warlord, Hussein Aideed, is not clear.
Mr Qanyare told the BBC's Network Africa programme that the gunmen will be retrained and turned into a security force.
"We want to remove from the city, technicals [battle-wagons] and the militia, in order to get normal security," he said.
However, our correspondent says that, for the moment, the gunmen are likely to remain loyal to the warlords, rather than President Abdullahi Yusuf, who has little support in Mogadishu.
Last week, a blast killed at least 14 people in Mogadishu, as Prime Minister Ali Mohammed Gedi made a speech during his first visit to the city since being appointed.
He later said the blast was an accident and denied he had been targeted.
Gedi is under pressure to base his government in the capital
The transitional government is under pressure from foreign donors to relocate to Somalia.
But Somalia's political leaders and warlords are divided over where in Somalia the administration should be based.
While the interim constitution names Mogadishu as the capital, the city is considered the most dangerous place in Somalia.
The regional body, Igad, has agreed to send up to 10,000 peacekeepers to Somalia to provide security for the government.
However, officials say a lack of funding and security fears mean their deployment looks set to be delayed.