Suicide bomber kills six in attack on Mogadishu mayor's office
United Nations special envoy James Swan had met the mayor, Abdirahman Omar Osman, and left just before the blast at the headquarters of the Banadir district, which encompasses Mogadishu, according to the mission's Twitter account.
"Six people, including two district commissioners and three directors, were killed in the terrorist attack this afternoon," Information Minister Mohamed Abdi Hayir Mareye told reporters.
As well as the mayor, five others, including district commissioners, were injured in the blast and being treated by doctors.
"I deplore this heinous attack which not only demonstrates a violent disregard for the sanctity of human life, but also targets Somalis working to improve the lives of their fellow Somalis in the Mogadishu-Banadir region," Swan said in a statement, confirming he had been in the building earlier in the day.
The al-Qaeda linked Al-Shabaab jihadist group claimed responsibility for the "well-prepared operation", saying they were targeting Swan.
A security source, who asked not to be named, said a suicide bomber had entered a hall where the officials were meeting and detonated the blast inside.
"The mayor was wounded in the blast and he is currently being treated. Some of the commissioners of Mogadishu district have also been wounded," deputy mayor Mohamed Abdullahi Tulah told the government's radio station Muqdisho.
Security forces are investigating the incident.
"The blast occurred inside but we are not sure what exactly caused it, some reports we are getting indicate it was caused by a suicide bomber... and there are casualties," said security official Mahdi Abdirahman.
"The blast was very heavy, and I saw people fleeing, some with shrapnel wounds, outside the Banadir administration headquarters," said witness Mohamud Shariif, referring to the regional government offices.
In a statement, Shabaab said they had "killed many of the enemy".
Mogadishu is regularly hit by attacks by the Shabaab, which has fought for more than a decade to topple the Somali government.
The city was on Monday struck by a car bomb that left 17 dead and more than two dozen wounded.