Somali government troops opened fire during a looting rampage at a World Food Program food distribution program in Mogadishu on Friday, killing at least seven famine refugees, witnesses said.

Witnesses said that government soldiers triggered the chaos by trying to steal some of the food aid. Then refugees joined in, prompting some soldiers to open fire, the witnesses said.

"It was carnage. They ruthlessly shot everyone," said Abdi Awale Nor, a refugee at Mogadishu's largest camp for those fleeing the famine, "Even dead bodies were left on the ground and other wounded bled to death."

Story continues below advertisement

Another refugee, Muse Sheik Ali, said soldiers first tried to steal some of the food aid, and other refugees began to take the food.

"Then soldiers opened fire at them, and seven people, including elderly people, were killed on the spot. Then soldiers took the food and people fled from the camp," he said.

The country's president and prime minister arrived at the camp later and planned to speak to journalists.

The deadly chaos in the course of trying to feed the thousands of hungry refugees who have fled to Mogadishu from Somalia's famine-struck south underscores the huge challenges international groups have in distributing food inside Somalia.

Story continues below advertisement

Witnesses said two World Food Program trucks were delivering aid when the chaos broke out. WFP often tries to do what it calls "wet feedings," in Somalia — giving out already made food like porridge — to limit the chances that it will be looted.

More than 12 million people in the Horn of Africa are in need of immediate food aid. The U.N. says 640,000 children in Somalia alone are acutely malnourished. The U.N. has declared five famine zones in Somalia, including the refugee camps of Mogadishu.

"They fired on us as if we were their enemy," said Abidyo Geddi, another refugee. "When people started to take the food then the gunfire started and everyone was being shot. We cannot stay here much longer. We don't get much food and the rare food they bring causes death and torture."

Delivering aid inside Somalia — where the militant group al-Shabab controls much of the south — is a huge challenge. Private militias — most of them politically connected — are competing to guard or even steal food as aid. There are at least four competing militias in government-controlled areas of Mogadishu.

Story continues below advertisement

The gunmen roar around in pickup trucks and wage battle over the wages they can be paid to either guard the aid or the cash it will bring when it is stolen and sold. The insecurity amid famine echoes the situation in 1992 that prompted deployment of a U.S.-led multinational force to safeguard the delivery of food to Somalia's starving.

That international intervention collapsed in 1993 after two U.S. Black Hawk helicopters were shot down and militias hired to protect the aid operations ended up looting vast amounts of food.