"They [the government] started the new offensive and they were defeated and remain in an area of only 2km. They have suffered a major setback," Sheikh Muse Abdi Arale, a spokesman for the rebel Hizbul Islam group, told Reuters.

There was no immediate comment from the government on the fighting.

Nationwide offensive

Somali fighters have vowed to continue their attacks against government forces and African Union (AU) peacekeepers stationed in the country.

Members of al-Shabab, a group of Islamist fighters, launched an unprecedented nationwide offensive in May against the government of President Sharif Sheikh Ahmed.

The internationally-backed Sharif has been holed up in his presidential quarters, protected by AU peacekeepers, as his forces remain unable to reassert their authority over Mogadishu.

More than 4,000 African Union peacekeepers are in Somalia, but they come under regular attacks and are generally confined to protecting government installations.

Somalia has not had an effective government since 1991 when the overthrow of a dictatorship plunged the country into chaos.

The vacuum has also allowed pirates to operate freely around Somalia's 3,060km coastline.

The fighting in Mogadishu has so far forced an estimated 400,000 people to flee their homes in the city.