World leaders have pledged to boost support for measures to fight piracy, terrorism and political instability in Somalia, after a meeting in London.
The conference agreed a seven-point plan promising more humanitarian aid, support for African Union peacekeepers and better international co-ordination.
US Secretary of State Hillary Clinton said the world must keep Islamist militant group al-Shabab "on the run".
A two-decade war has wrecked Somalia, leaving it without a proper government.
The current transitional government has direct control only in the capital, Mogadishu. It is propped up by 12,000 African Union (AU) peacekeepers.
Al-Shabab militants, who recently joined with al-Qaeda, control large swathes of territory.
Mrs Clinton ruled out talks with al-Shabab, saying that its decision to join forces with al-Qaeda showed "it is not on the side of peace, stability or the Somali people".
However, she said the international community was ready to engage with anyone willing to renounce violence and embrace the peace process.
Somali officials had earlier urged targeted air strikes against al-Shabab targets, but Mrs Clinton said there was no case for that kind of action.
UK Prime Minister David Cameron, hosting the conference, said setting up an inclusive government was vital to the country's future, and that it must work alongside AU military action.
"Those young people who take up guns for al-Shabab need to be able to see that there is a future in a prosperous stable Somalia that offers them what everyone wants, which is a job and a voice," he told a news conference.
"So the connection between military action to put huge pressure on Shabab, which has been happening, and the political process, they are two sides of the same coin."
In a final communique, the 55 countries and organisations gathered in London said they would:
- back the handover of power from the transitional government to an inclusive administration by August
- provide more support for African Union peacekeepers
- better co-ordinate humanitarian aid, shifting focus to long-term needs
- crack down on piracy by expanding on agreements to bring suspects to trial in countries away from Somalia
At the start of the conference, President Sheikh Sharif Ahmed, leader of the transitional government, said Somalis wanted to shake off "horrendous memories of the past", but feared the gathering might be just another diplomatic talking shop.
"Today we are looking for security. We are scared," he said.
"We want to know what happened to the resolutions, all those hopes in the past which never saw the light of day, and which remain as mere words on pieces of paper."
Representatives from many Somali factions attended the London conference, but al-Shabab was not invited.
The militant group denounced the London conference as another attempt to colonise Somalia.
"They want us under trusteeship and we will not allow that. God willing we will face the outcome with full force and stop it," said al-Shabab spokesman Ali Mohamud Rage.
The Islamist militants were forced out of Mogadishu last year, and are under pressure from Kenyan, Ethiopian and Somali government troops elsewhere.
On Wednesday, Ethiopian and Somali troops took control of the strategic stronghold of Baidoa, in the south-west of the country, from al-Shabab.
The BBC's Mohammed Dhore in Mogadishu says security is extremely tight in the city because of the conference, with more than 50 roadblocks compared with the usual five.
BBC's Andrew Harding in Somalia
- Fragile peace on Mogadishu streets 01:34
- Tension on Somali new frontline 01:22
- Armed guards in refugee camps 02:14
- UN pledge more troops for Somalia 02:13
- Cameron's hopes for Somali future 02:41
- High risks reporting war torn land 01:43
- Hunting Somali pirates from the air 03:01
- Foreign aid vital for refugees 02:27