(CNN) -- British Prime Minister David Cameron urged the international community Thursday to help Somalia's feeble government tackle piracy, militants and hunger.
Otherwise, he said, the world risks terror threats from the troubled African nation.
World leaders met Thursday in London to address terror and conflict in the Horn of Africa nation and find ways to resolve other critical problems, including famine and weak leadership.
Cameron said he hoped the conference presented a "turning point" in the beleaguered nation's hard road to establish stability.
British Foreign Minister William Hague dismissed criticism of the conference by some critics who said it lacked enough Somali input.
"It's not Western, it's global," he told CNN. "Part of our objective here is to build up the local governments, the regional governments, the institutions that have been able to take root ... which is why they are all here. It's not top down at all."
However, Amnesty International said the conference failed adequately to address a "dire human rights situation" in Somalia.
"The recent surge in military operations increases civilians' vulnerability to attacks and displacement, and brings more arms into a country already awash with weapons," said Benedicte Goderiaux, Amnesty International's Somalia researcher.
"This is a lethal mix that could fuel further human rights abuses. At this conference, we hoped to see more efforts to improve the safety of the Somali population."
Representatives from 40 countries, including Somali Prime Minister Abdiweli Mohamed Ali and U.S. Secretary of State Hillary Clinton, attended the conference on stabilizing and rebuilding Somalia after decades of war.
"These problems in Somalia don't just affect Somalia. They affect us all," Cameron said.
The British leader announced agreements on key areas including a new task force on piracy ransoms and the willingness of three countries -- Tanzania, Mauritius and the Seychelles -- to take on judicial responsibilities to convict pirates.
"This is a complex jigsaw puzzle where every piece has to be put into place,' he said.
"In a country where there is no hope, chaos, violence and terrorism thrive. Pirates are disrupting vital trade routes and kidnapping tourists. Young minds are being poisoned by radicalism, breeding terrorism that is threatening the security of the whole world."
Cameron said the world cannot afford to look the other way any more.
"If the rest of us just sit back and look on, we will pay a price for doing so," he said. "For two decades, politicians in the West have too often dismissed the problems in Somalia as simply too difficult and too remote to deal with."
Kenyan President Mwai Kibaki said the Islamist Al-Shabaab militant group's recent announcement that it had joined al Qaeda should serve as a wake-up call.
"Clearly, a new and more dangerous theater for terrorist action has emerged in Somalia, and this calls for focused and concerted international effort," said Kibaki, whose nation hosts the world's largest refugee camp. Dadaab is brimming with desperate Somalis who have fled their homeland.
Kibaki said it was vital to develop a Somali national security force to guarantee long-term security and stability.
"In this regard, there is need to support the setting up of a nucleus Somali armed force," he said.
Ali, the Somali leader, said he even welcomed airstrikes to rid his country of Al-Shabaab terrorists, though that was not on the conference agenda.
Clinton said the United States sees no reason for military strikes. She announced $64 million in humanitarian aid from Washintgon and said the focus should be on political progress.
"The transitional federal government was always meant to be just that -- transitional," she said. "It is past time for that transition to occur, and for Somalia to have a stable government. "
Somalia has not had a central government since 1991, and Al-Shabaab has waged war against the transitional federal government for years.
Clinton said the United States will continue to work with Somali officials to create jobs, provide health and education services, and conflict resolution.
"And today I'm pleased to announce that the United States is providing an additional $64 million in humanitarian assistance to the Horn of Africa countries," she said.
She said the funds bring the total U.S. emergency assistance to the region up to more than $934 million since last year, including more than $211 million for life-saving programs in Somalia.
Thursday's session aimed to galvanize the international community to develop a more comprehensive approach toward the country. But there was also recognition that it would take time to bring change to a place that has come to epitomize a failed state.
"We are realistic -- Somalia's problems cannot be solved in a day, but its people deserve a better future, and our own security requires their country to become more stable," Hague said.
He said the London conference aimed to build a legitimate political process to ensure stability.
On the latter, he applauded the U.N. Security Council's decision Wednesday to increase the African Union force in Somalia from about 12,000 to close to 18,000 troops.
"We must keep up the pressure on Al-Shabaab so that their grip on Somalia continues to weaken," Clinton said.
In recent months, the terror group has lost ground but remains a potent threat in the country. The international community hopes the bolstered African Union force will further degrade the group, creating space for a political solution.
E.J. Hogendoorn, director of the International Crisis Group's Horn of Africa project, called Al-Shabaab "resilient" and said the militants will try to regain strength by exploiting the transitional government's lack of progress,
"Unless a more appropriate political framework is developed for Somalia, Al-Shabaab or its successor will remain a regional and wider international concern for many years to come,' Hogendoorn said.
Established in 2004, Somalia's transitional government is weak and needs significant capacity building to consolidate the country's security gains with political ones.
The international community wants it to meet a timeline for establishing a new government, including writing a constitution, before August when its mandate expires.
The crisis in Somalia has drawn in neighboring Kenya and Ethiopia, which have both sent troops directly, while Uganda, Djibouti and Burundi are contributing peacekeepers. The United States has used drones to target militants in Somalia.
Adding to Somalia's burdens is the fight against famine, which has forced a constant stream of refugees into neighboring nations.
The United Nations declared an end to the famine recently but said the hunger situation remains dire.
The next international meeting on Somalia is scheduled for June in Istanbul, Turkey.
CNN's Nima Elbagir, Becky Anderson and Elise Labott in London contributed to this report.