MOGADISHU, Somalia — The Shabab Islamist insurgent group, which controls much of southern Somalia, is blocking starving people from fleeing the country and setting up a cantonment camp where it is imprisoning displaced people who were trying to escape Shabab territory.

The group is widely blamed for causing a famine in Somalia by forcing out many Western aid organizations, depriving drought victims of desperately needed food. The situation is growing bleaker by the day, with tens of thousands of Somalis already dead and more than 500,000 children on the brink of starvation.

Every morning, emaciated parents with emaciated children stagger into Banadir Hospital, a shell of a building with floors that stink of diesel fuel because that is all the nurses have to fight off the flies. Babies are dying because of the lack of equipment and medicine. Some get hooked up to adult-size intravenous drips — pediatric versions are hard to find — and their compromised bodies cannot handle the volume of fluid.

Most parents do not have money for medicine, so entire families sit on old-fashioned cholera beds, with basketball-size holes cut out of the middle, taking turns going to the bathroom as diarrhea streams out of them.

“This is worse than 1992,” said Dr. Lul Mohamed, Banadir’s head of pediatrics, referring to Somalia’s last famine. “Back then, at least we had some help.”

Aid groups are trying to scale up their operations, and the United Nations has begun airlifting emergency food. But many seasoned aid officials are speaking in grim tones because one of Africa’s worst humanitarian disasters in decades has struck one of the most inaccessible countries on earth. Somalia, especially the southern third where the famine is, has been considered a no-go zone for years, a lawless caldron that has claimed the lives of dozens of aid workers, peacekeepers and American soldiers, going back to the “Black Hawk Down” battle in 1993, spelling a legacy that has scared off many international organizations.

“If this were Haiti, we would have dozens of people on the ground by now,” said Eric James, an official with the American Refugee Committee, a private aid organization.