Violence in Mogadishu has driven away thousands of people
The UN Security Council has held its first discussions with Somalia's government and its opponents as a peace mission to Africa gets underway.
Somalia's Islamist opposition said face-to-face talks will not happen at the meeting in neighbouring Djibouti unless Ethiopian troops leave Somalia.
Talks began as the Security Council passed a resolution permitting foreign warships to enter Somali waters.
The move is a bid to crack down on the piracy gripping the nation's seas.
The diplomats are also due to go to Sudan and other countries at war.
BBC World Affairs correspondent Mark Doyle, who is travelling with the mission, says there is less optimism about the situation in Sudan.
The mass displacement of civilians in the country's troubled western province of Darfur is still unresolved, and the peace agreement between the north and south of the country is in the midst of new tensions.
The mission will also visit the Democratic Republic of Congo, where millions of people have been displaced by fighting in the east of the country.
The Security Council is holding separate meetings in Djibouti with the Somali government and the opposition at a luxury hotel on the shores of the Red Sea, although key hard-line militia opponents are not present.
"We believe that the people of Somalia are ready to move to another stage in your history and to move towards peace and security," said South Africa's UN ambassador Dumisani Kumalo at the start of the talks with the government delegation.
Somalia has not had a functioning national government since 1991.
Somalia's foreign minister told the BBC that he was ready to hold direct talks with the opposition Alliance for the Re-Liberation of Somalia (ARS).
But the talks are being boycotted by the hard-line al-Shabab militia, blamed for many of the attacks on government troops and their Ethiopian supporters.
They refuse to hold talks until the Ethiopian troops leave the country.
But President Abdullahi Yusuf says there would be a security vacuum if the Ethiopians withdrew before being replaced by UN peacekeepers.
"I am willing to do whatever it takes to promote peace and stability in Somalia," he said.
A small contingent of African Union troops is in Mogadishu but has done little to quell the violence.
In a sign of Somalia's instability, the plane taking President Yusuf to Djibouti was delayed by a mortar attack on the airport.
The plane was not hit but there are unconfirmed reports of two minor injuries in the attack blamed on Islamist insurgents.
Our correspondent says Somalia is the ultimate failed state - the capital Mogadishu is destroyed by war and an estimated half of the city's population has fled.
The UN says almost two million Somalis are in desperate need of outside assistance.
An Islamist insurgency there has been mounting almost daily attacks on the weak government which is backed by the United States because Washington believes the Islamists are associated with al-Qaeda.
Some experts on this part of Africa say the strong US backing of one side, rather than emphasising the importance of talks between the factions, has exacerbated the situation.
Nevertheless, UN diplomats believe that the recent appointment of a new prime minister in Somalia, Nur Adde, who has said he will negotiate with anybody, provides a rare window of opportunity for a peace initiative.
The unanimous UN resolution to allow warships to enter Somali waters is a reaction to the 26 ships that have been attacked by pirates in the past year.