At least six people reported killed as Al Qaeda linked terror group claims responsibility for the assault on a regional government building, which also houses the mayor's office .
At least six civilians have been reported killed in Somalia following an attack carried out by the Al Qaeda-linked terror group, Al Shabab, at the mayor's office in central Mogadishu, according to the police.
A suicide bomber set off a huge blast on Sunday, tearing through building near the office complex with gunfire erupting afterwards, Somali police spokesman Sadik Dudishe said at the end of the four-hour siege.
"All the six attackers died. Five of them during the fire exchange with the security forces and one of them detonated himself," Dudishe told reporters.
"Six civilians also died during the attack and the situation is back to normal."
All the staffers at the mayor's office were rescued, the police added.
Al-Shabaab claimed responsibility for the attack, saying its fighters "made their way inside the targeted building after killing the security guards."
Witnesses said the initial explosion damaged nearby buildings and gunfire could be heard in the vicinity of the mayor's office.
The Associated Press news agency earlier reported at least 16 wounded.
"We were in the office and we were deafened by a blast, we ran out, gunfire followed," Farah Abdullahi, who works in the mayor's office, told Reuters news agency.
READ MORE: Somali military captures Al Shabab stronghold
The mayor's office is located in the local government headquarters building in a well guarded area of Mogadishu.
Roads in the area have concrete barriers and multiple roadblocks. The building is about one and a half kilometres away from Villa Somalia, the president's office.
Al Shabab frequently carries out bombings and gun assaults on targets in Mogadishu and across the country.
The terror group has been attacking Somalia's central government since 2006 as it seeks to topple it and replace it with its own rule.
Al Shabab has stepped up attacks in recent months in a show of resilience after President Hassan Sheikh Mohamud's government launched an offensive against the Al Qaeda-allied militants last August.
In recent days Somali government forces had retaken from Al Shabab a strategic port town, prompting fears of reprisal from the armed fighters.
The latest attack comes days after seven soldiers were killed on Friday at a military camp in Galcad, a town in central Somalia about 375 kilometres (230 miles) north of Mogadishu.
The US military said on Saturday the attack — in the Somali town retaken by the army this week — involved more than 100 Al-Shabab fighters.
READ MORE: Death toll rises after gunmen storm hotel in Somalia capital