The top humanitarian official at the United Nations sounded the alarm on Wednesday about the looming risk of famine in the Horn of Africa because of drought, warning that more than five million people are threatened, mostly Somalis.

The official, Mark Lowcock, under secretary general and emergency relief coordinator at the United Nations, said that he had allocated $45 million from its emergency relief fund to help purchase food and other assistance for people of the region, and that many of them could face a serious food crisis by September. He called the allocation one of the biggest ever made from the fund.

Somalia and parts of neighboring Ethiopia and Kenya have suffered from repeated seasons of failed rains that have shriveled crops, depleted livestock and left people’s food and water supplies increasingly insecure.

“Communities that were already vulnerable due to past droughts are again facing severe hunger and water scarcity and are at risk from deadly communicable diseases,” Mr. Lowcock said in a statement announcing the emergency allocation. He said aid agencies in Somalia in particular were “overstretched and grappling with a severe lack of funding.”