The UN's humanitarian chief warned on Monday that drought-ravaged Somalia was on the brink of famine and time was running out to save lives.

"Famine is at the door and we are receiving a final warning," Martin Griffiths, head of the UN's Office for the Coordination of Humanitarian Affairs (OCHA), told a press conference in Mogadishu.

"We are in the last moment of the 11th hour to save lives," he declared.

An upcoming food and nutrition report on Somalia has concrete evidence that famine will strike two regions between October and December, Griffiths said.

"I've been shocked to my core these past few days at the level of pain and suffering we see so many Somalis enduring," said Griffiths, who began a visit to the country on Thursday.

Somalia and its neighbours in the Horn of Africa including Ethiopia and Kenya are in the grip of the worst drought in more than 40 years following four failed rainy seasons that have wiped out livestock and crops.

Humanitarian agencies have been ringing alarm bells for months.

The UN's World Food Programme (WFP) last month said the number of people at risk of starvation across the region had increased to 22 million.

In Somalia alone, the number of people facing crisis hunger levels is 7.8 million, or about half the population, while around a million have fled their homes on a desperate quest for food and water, UN agencies say.

In 2011, famine in parts of Somalia, one of the poorest countries on the planet, cost the lives of 260,000 people, more than half of them children under the age of six.

Griffiths described scenes of heart-rending suffering during his visit to Baidoa, one of the two areas at risk of famine, saying he saw "children so malnourished they could barely speak" or cry.

The conflict-wracked country is considered one of the most vulnerable to climate change but is particularly ill-equipped to cope with the crisis.

A deadly insurgency by the radical Islamist Al-Shabaab group against the fragile federal government is limiting humanitarian access to many areas.

A long-running political crisis also diverted attention away from the drought, but new President Hassan Sheikh Mohamud used his inauguration speech in June to appeal for international help to stave off looming disaster.

In recent years, increasingly extreme droughts and floods have added to the devastation caused by a locust invasion and the Covid-19 pandemic.

"Somalia is facing unprecedented levels of drought which have particularly hit rural communities, alongside other impacts like conflict, Covid-19, macroeconomic challenges, and a recent desert locust upsurge," the UN's Food and Agriculture Organization (FAO) said in a statement on Friday.

It said people's means to produce food and earn income were "stretched beyond breaking point".

The UN's World Meteorological Organization (WMO) has said the Horn was likely facing a fifth straight failed rainy season over the months of October to December.

At the start of this year, the WFP had put the number at 13 million, and appealed for donors to open their wallets at a time of great need.

Funds were initially slow in coming, with Russia's invasion of Ukraine among other crises drawing attention from the disaster in the Horn, humanitarian workers said.

The war in Ukraine has also sent global food and fuel prices soaring, making aid delivery more expensive.

In June, British charity Save the Children had issued an alert that the international community was "sleepwalking towards another catastrophic famine" in Somalia.

OCHA has said the March-May 2022 rainy season was the driest on record in the last 70 years "making the 2020-2022 surpass the horrific droughts in both 2010-2011 and 2016-2017 in duration and severity".

"An estimated 2.3 million girls and boys are at imminent risk of violence, exploitation, abuse, neglect, and death from severe acute malnutrition as result of food and nutrition crisis across Somalia," it said in August.

In 2017, more than six million people in Somalia, more than half of them children, needed aid because of a prolonged drought across East Africa.

But early humanitarian action averted famine that year.

The Inter-Agency Standing Committee chaired by Griffiths brings together the heads of 18 organisations inside and outside the UN.