Somali government troops have shot dead three Islamist militants holed up in a building in central Mogadishu, ending a day-long bomb and gun attack that killed at least 29 civilians.
Islamist al Shabaab fighters launched the assault with a suicide car bomb outside a hotel on Thursday evening destroying other structures, and leaving people wounded.
The militants who are fighting to overthrow the Western-backed government fled to a neighbouring building and opened fire on special forces.
Somalia has suffered lawlessness and violence since 1991, and a further layer of chaos was added in 2015 with the formation of a splinter group of former al Shabaab insurgents, who pledged allegiance to Islamic State.