London - Somalia struck a new stability pact with the international community on Thursday, aimed at steadying the fragile state by bolstering its security, staving off famine and rebooting its economy.New President Mohamed Abdullahi Mohamed hailed a "historic day for Somalia" after concluding the pact between Mogadishu and the international network propping up the crisis-wracked country at a conference in London."As we begin on this journey in this new era of Somalia's recovery, the commitments made must be followed through," said the president, commonly known by his nickname Farmajo."The expectations are very high but not performing is not an option."Somalia and its partners agreed a 17-page security pact, which it is hoped will lay the foundations for a peaceful and prosperous country to emerge from the wreckage of a failed state."After more than 20 years of a dramatic conflict that caused immense suffering to the Somali people... all the conditions are now met for Somalia to be a success story," said United Nations Secretary-General Antonio Guterres."Somalia has a government in which we can put our trust, and a plan which makes sense."The UN chief hailed the security pact which should see more joined-up international training for the army in combating the militant Islamist group Shabaab, which has been fighting to overthrow the Somali government for the last decade.Famine warning But he nonetheless warned that despite more than $600m raised so far this year for drought relief, a further $900m was now needed in the next six months to prevent the situation worsening into a famine.More than six million people, around half the population, are already dependent on emergency food supplies.Peter de Clercq, the UN humanitarian coordinator for Somalia, told reporters that two failed rainy seasons had exhausted people's resilience "to the absolute minimum"."People are coming to the cities in a last-ditch attempt to survive. The situation is getting worse. If we don't continue the effort until the end of the year, we are very likely to end up with famine," he said.The UN said last week that Somalia will have 1.4 million acutely malnourished children by the end of the year, up 50 percent from late 2016.British Foreign Secretary Boris Johnson, who co-hosted the conference along with Farmajo and Guterres, said: "We have the means to avoid a famine and stave off catastrophe if, and only if, we escalate our collective response.""Somalia remains a wounded country but it is in the process of being healed," he concluded.Arms embargo call Somalia, which has frequently topped the Fragile State Index, is under a new president, prime minister and parliament this year and the London conference was focused on underpinning stability in this electoral cycle.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.Farmajo called for the arms embargo on Somalia to be lifted in the near future, saying that if its army did not have better weapons than the Shabaab, the conflict would go on for another 10 years.US Defence Secretary James Mattis held talks with Farmajo at the conference and told reporters as he returned to Washington that the United States would continue kitting out the infantry with gear and non-lethal equipment."There is certainly an attitude of renewed hope based on the election of what appears to be a very good leader in terms of understanding the need for military security, but as well economic efforts," he said.According to a US defence official, the Pentagon currently has several hundred troops stationed in Somalia, primarily devoted to counter-terror training.The gathering also tried to secure a path towards debt relief in one of the world's poorest countries, which has a $5.3bn-standing debt pile and an annual national budget of $250 million -- half the humanitarian aid spend in a good year.