The government and rebels who want to install an Islamic state in the east African country blame each other for instigating the violence.
Al-Shabab fighters launched an unprecedented nationwide offensive in May against the administration of President Sharif Sheikh Ahmed.
The internationally backed Sharif has been holed up in his presidential quarters, protected by African Union peacekeepers, as his forces were unable to reassert their authority over the capital.
Around 300 people are confirmed to have been killed in the latest violence, many of them civilians.
More than 4,000 African Union peacekeepers are in Somalia, but they come under regular attack 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,060 kilometre coastline.