The UN Secretary-General has called for urgent international aid for Somalia to head off the risk of warlords exploiting a power vacuum after the scheduled change of power in August.
"We urgently need assistance to avoid a power vacuum that warlords might exploit," Ban Ki-moon said on Friday.
"I urge donors to contribute to this critical effort. In the face of terrorism, piracy and drought, Somalia needs solidarity," he told delegates from more than 50 countries gathered in Istanbul for an international conference on Somalia.
The UN chief said that with the war-torn country's transitional body preparing to hand over power in August, nations had to do their part to build a steady government after two decades of instability.
"The end of the transition marks the beginning of a new phase in the political process," he said, adding that the provisional constitution needed to be an inclusive one.
"All Somalis, regardless of gender, clan, or political affiliation should be able to take part in elections."
It was important, he said, to gain the confidence of the Somali population, especially in areas recovered from al-Shabab control.
The Istanbul meeting comes as government troops backed by an African Union force attempt to defeat the al-Shabab, an armed group that has declared its allegiance to al-Qaeda.
Sharif Sheikh Ahmed, the Somali president, spelled out the scale of the task that lay ahead for the Horn of Africa nation after two decades of conflict that has cost 400,000 lives since 1991.
The country's infrastructure would have to be rebuilt, he said, adding: "It is a costly matter and our resources are very limited."
Host country Turkey, which launched a major aid initiative last year for Somalia to help it through its worst drought in decades, also stressed the need for immediate help.
"Somalia needs, more than ever, material aid," Ahmet Davutoglu, Turkey's foreign minister, said.
The aim was to set up a new state structure following the August handover of power that would allow for normal life to return for good in Somalia, he added.
On the first day of the conference, Bekir Bozdag, Turkey's deputy prime minister, said the Somali capital Mogadishu was now open for business, as pro-government forces had largely driven out Islamist armed groups.
William Hague, the British foreign secretary, who was also attending the Istanbul conference, has underlined the improvement in the security situation in Mogadishu, saying three of his country's ministers have visited this year.
In a statement on Thursday, he added: "All eyes are now on Somalia's leaders to ensure that they deliver a peaceful handover of power and succession when the transitional period formally ends in August."
The Istanbul conference builds on a February gathering in London.
The newly formed government, Ban emphasised in a closing speech, would have to expand its authority throughout Somalia and "deliver basic services to their peoples and create inclusive institutions that these peoples can trust".
Since the 1991 ouster of former president Mohamed Siad Barre, Somalia has been variously governed by warlords and armed groups, each controlling their own limited fiefdoms.