An African Union commander says two AU peacekeepers were killed during a battle in the country's capital.

Maj. Gen. Nathan Mugisha said Thursday that his force killed several militants in the Mogadishu battle. He said three AU soldiers were also wounded.

AU mission spokesman Paddy Ankunda said al-Shabab militants who are trying to overthrow the government lost ground in the battle. AU peacekeepers are backing Somalia's fragile government.

Mogadishu residents dragged a corpse, which they said was an AU peacekeeper, through the streets.

The ongoing offensive is aimed at breaking insurgents' grip on large swaths of the country's south and central regions.

Somalia has not had a functioning government for more than 20 years.