African Union troops fought house-to-house battles with militants Thursday to clear space for aid groups bringing in food supplies after intelligence reports showed insurgents reinforcing for a possible attack on squalid camps of famine refugees.
Heavy fighting erupted on the line of control between the government side and territory held by al-Shabab, Somalia's dominant militant group.
At least six people were killed. The AU troops also paid a heavy price, with one official saying 19 were wounded, and some of them were put on an ambulance jet bound for Kenya.
Somalia's famine is unfolding in the middle of a war zone, greatly complicating international efforts to prevent a wave of death. Some 2.2 million people live in an inaccessible famine zone controlled by the al-Qaida-linked al-Shabab.
Thursday's house-to-house fighting was only 2 1/2 miles (4 kilometers) from the nearest famine refugee camp, said Lt. Col. Paddy Ankunda, spokesman for the African Union peacekeeping force.
The offensive, he said, was to ensure the city streets are safe for aid groups to get humanitarian supplies to the more than 20,000 famine refugees that have arrived in Mogadishu this month alone.
"The agencies have been trying to deliver. Unfortunately, al-Shabab has been bent on ensuring this aid does not reach the people," Ankunda said. "This operation is about the delivery of humanitarian aid."
Al-Shabab's decision last week to rescind permission allowing aid groups to operate in areas under militant control has denied hundreds of thousands of Somalis access to food aid, he said.
Ankunda added that al-Shabab has sent 300 reinforcement fighters to Mogadishu in recent days.
Refugees have said militants already killed men who tried to flee famine-hit regions of Somalia with their families, saying it is better to starve than accept help from the West. African Union intelligence reports have indicated there could be attacks on Mogadishu's patchwork of ad-hoc refugee camps.
Thursday's battle was a "short, tactical offensive operation," Ankunda said.
"This action will further increase security ... and ensure that aid agencies can continue to operate to get vital supplies to internally displaced," he said.
Mogadishu resident Mohamed Hussein said al-Shabab fighters had withdrawn shortly after the offensive began.
"We have captured most of the bases we attacked ... and our troops are still chasing them," said Abdullahi Ali Anod, a Somali military commander.
Troops from the African Union Mission in Somalia, known as AMISOM, have been eroding al-Shabab's territory all year. Ankunda said the government now controls more than 60 percent of Mogadishu, up from around 40 percent at the beginning of the year.
AMISOM will keep humanitarian organizations informed of future operations to limit the impact on famine relief efforts, he said.
"AMISOM fully understands the need to restrain military operations while the aid agencies mount their humanitarian campaign. However, we are here to maintain stability in Mogadishu, and if we perceive a threat from the extremist insurgents, then it is our duty to protect and defend the most vulnerable from this threat," he said.
The World Food Program operations were being conducted normally, said spokeswoman Challiss McDonough.
"The airlift plans have not been affected at this point," she said. "Our humanitarian mission remains unaffected and unchanged."
Ali Muse, the head of Mogadishu's ambulance service, said his workers had collected the bodies of six dead and 20 wounded after Thursday's fighting.
A medical official at Mogadishu airport said wounded AU peacekeepers would be flown to Nairobi, the capital of neighboring Kenya, for treatment. He spoke on condition of anonymity because he is not authorized to talk with the press. An Associated Press reporter watched as three wounded soldiers were put in a small jet for the flight.
Ankunda said he could confirm only that two AU troops had been wounded.
The famine in the Horn of Africa threatens al-Shabab's hold on areas under its control, with the militants fearing that the disaster will drive away the people they tax and force into military service. The militants previously have blocked aid workers from helping those in need in Somalia, fearing that foreign assistance would undermine their control.
The WFP said Thursday it has a funding shortfall of $252 million for famine relief efforts in the Horn of Africa. The agency said it was encouraged by the response of some donor countries that have pledged $250 million to help.
The WFP estimates more than 11.3 million people need aid across drought-hit regions in East Africa. Most of those affected live in pastoral communities where herds have been wiped out because of a lack of water.
The drought has created a triangle of hunger where the borders of Ethiopia, Kenya and Somalia meet. The U.N. believes tens of thousands already have died in Somalia in areas held by the Islamist rebels.
But the famine has particularly ravaged Somalia because many aid groups were banned from militant-controlled areas two years ago.
Somalia has been mired in conflict since 1991 when longtime dictator Siad Barre was overthrown by warlords who then turned on each other. Islamist militants led by al-Shabab are trying to overthrow the weak U.N.-backed government that is being propped up by about 9,000 AU peacekeepers from Uganda and Burundi.
Associated Press writer Abdi Guled contributed to this report from Mogadishu.