A huge blast tore through buildings near the mayor's office in central Mogadishu on Sunday, with gunfire erupting afterwards, police and witnesses told AFP.
"Terrorists blasted a vehicle loaded with explosives onto a perimeter wall of the Mogadishu mall which is next to the Banadir administration headquarters," police officer Abdullahi Mohamed said.
Witnesses said the huge explosion damaged nearby buildings and gunfire could still be heard near the mayor's office.
"There is gunfire going on inside the vicinity of the main building but we don't know what is happening inside," a witness who runs a business near the offices said.
"There are some casualties but the whole area is cordoned off and we have been asked to move away by the security forces."
Another witness, Omar Nur, said he was inside the mall when the explosion went off and "was lucky to have escaped safely."
It was not immediately clear who was behind the attack.
Militants have been waging a bloody insurgency against the frail internationally-backed central government for 15 years, carrying out attacks both in Somalia and neighbouring countries.
In recent months, the army and local clan militias have retaken swathes of territory in the centre of the country in an operation backed by US air strikes and an African Union force.
But the insurgents have frequently retaliated with bloody attacks, underlining their ability to strike at the heart of Somali towns and military installations despite the offensive.
Police officers take up positions outside of the Mayor's office where an ongoing gun battle erupted following a reported explosion, in Mogadishu (AFP)