Somali government forces and African Union troops have battled insurgents in heavy fighting in the capital Mogadishu to secure aid routes for drought victims.

At least 27 civilians were hurt in fighting, medics said.

The clashes were a day after the UN World Food Programme began airlifting emergency supplies to thousands in the war-torn capital who have fled famine in the Horn of Africa.

"Our troops have dealt with specific security threats in a short tactical offensive operation," said Paddy Ankunda, of the AU force in Somalia.

This was to "ensure that aid agencies can continue to operate and get vital supplies to internally displaced persons". Three positions in the city were captured in a "limited and pinpoint offensive", Ankunda said.

Fighting with machine-guns and artillery flared near the city's Bakara market and Suqbacad areas.

Witnesses said AU troops and tanks crossed a frontline in their war with Shebab insurgents and moved into the Suqbacad area.

"We have counted about 27 civilian casualties. They were caught in the crossfire," said ambulance driver Mohamed Abdiwahab.

"The few people still in the area have now started to flee," said Muktar Ahmed, a resident of the Suqbacad neighbourhood.

Shebab Islamists have vowed to topple the Western-backed transitional government and chase out the AU troops supporting it.

But the al-Qaeda-inspired Shebab has been losing ground in the capital as government and AU troops claw their way back to key positions.

Officials said that at least 10 Shebab fighters and two government soldiers were killed, and two troops in the AU force were wounded.

"We have advanced on key positions in southeastern Mogadishu, defeating the enemy and killing more than 10 of them," said Abdulahi Ali, a Somalian officer.

Fighting died down later yesterday, but sporadic shelling could still be heard.

Somalia is the Horn of Africa country worst affected by the long drought that has put 12 million people in danger of starvation and spurred a global fund-raising campaign.

Nearly half of Somalia's estimated 10million people need aid because of fighting and drought. The UN has declared a famine.

Thousands of Somalians streamed into Ethiopia and Kenya seeking food and water, but up to 100000 people have fled to Mogadishu in the past two months, said the UN refugee agency.