What you need to know:
Al-Shabaab remains capable of launching devastating attacks, Mr Keating said.
The UN agency cited a 10-fold increase in the number of Somalis classified as on the brink of famine.
A peaceful transfer of presidential power took place in 2017, Mr Keating noted.
United Nations officials are offering a mixed but mainly negative year-end assessment of conditions in Somalia, while warning of a “grim” humanitarian outlook for 2018.
Progress towards stability is being impeded by extreme drought and hunger, by Al-Shabaab's continued ability to slaughter large numbers of civilians, and other “enormous challenges,” said Michael Keating, head of the UN Somalia Mission.
“These include pervasive corruption, most obviously in politics, and powerbrokers’ willingness to use violence, or the threat of violence, against opponents,” he said in a review of Somalia's status.
Noting that Al-Shabaab remains capable of launching devastating attacks, Mr Keating said the militant Islamist group “thrives, among other things, on the absence of functional local government and on the many conflicts around the country”.
And it is not only Al-Shabaab that threatens the country's future, he added.
“Somalis deserve better than to watch as the most privileged compete for personal gain at a time when they face so much adversity and insecurity,” Mr Keating said.
In a bulletin issued on Wednesday, the UN's humanitarian agency cited a 10-fold increase in the number of Somalis classified as on the brink of famine — from 88,000 in January 2017 to 866,000 in November.
Overall, 6.2 million Somalis require humanitarian aid, the UN body said.
“More than half of these require urgent life-saving assistance.”
Projections of below-average rainfall for the coming year indicate that Somalia's “unprecedented drought” is likely to persist, the bulletin added.
“The prospects for recovery in 2018 remain grim,” it said.
Some achievements did occur during the past year, Mr Keating noted.
He pointed to a coordinated effort by the government, business sector, civil society, the diaspora and international donors that succeeded in averting famine.
A peaceful transfer of presidential power took place in 2017, Mr Keating pointed out.
In addition, “80 female members of parliament took their seats, accounting for a remarkable 24 percent of both houses”.
Mr Keating concluded his assessment with an expression of personal optimism, saying he is “encouraged by what has been achieved, while aware of how difficult the situation remains”.