In late February, Farmajo declared a national disaster for the drought that has forced 6.2 million Somalis - about half of the country's population - to seek urgent food assistance and triggered fears of a potential starvation, according to the UN.
Somalia's government and its foreign backers earlier said they were hammering out a plan to try and strengthen the army to take over the fight against al Shabaab militants from over-stretched African Union troops.
Guterres said the drought was Somalia's "most pressing priority" and appealed for an additional $900 million (828 million euros) by the end of the year to prevent it worsening into a starvation. He said we can tip the scales from danger to safety.
"We want to see the integration of Somali regional forces and an increase in Somali capacity, as this will be crucial in allowing the resumption of offensives against the remaining al Shabaab strongholds in southern Somalia".
Despite this progress, May said, Somalia was still ranked the most fragile state in the world and was suffering from a severe drought that had left more than 6 million people in need of humanitarian assistance and driven millions from their homes.
New President Mohamed Abdullahi Mohamed hailed a "historic day for Somalia" after concluding the pact between Mogadishu and the global network propping up the crisis-wracked country at a conference in London.
The agreed pact is aimed at ensuring that Somalia can take greater responsibility for its own security from the 22,000-strong African Union troop deployment.
- Reuters picMired in violent chaos since 1991, Somalia is also suffering the effects of a severe drought that has left parts of the country on the brink of starvation.
Save the Children CEO Kevin Watkins said: "Somalia continues to drift towards an avoidable starvation".
"I want to strike a bargain whereby Somalia's leaders carry out vital security reforms, including drawing up a clear plan for a national army, in return for more help and training from the worldwide community".
Somalia also confronts the worst outbreak of cholera in five years, with nearly 690 deaths so far this year and cases expected to reach 50,000 by the end of June, the World Health Organization said in a statement Thursday.
Hundreds of thousands of Somalis, the vast majority women and children, have been displaced by a drought since November.
We recently asked you to support our journalism. Some of you have even followed through with subscriptions, which is especially gratifying. And our promise to you is that we will always strive to provide indispensable journalism to our community.
We're thankful for your support in every way.