Somali authorites say security forces have brought to an end a bomb and gun attack by al-Shabab fighters on a central Mogadishu hotel that killed at least 16 people and wounded 55 more.
Two legislators were among the dead in Wednesday's attack on Hotel Ambassador, which ended with police shooting the assailants.
Al-Shabab, the armed Somali group, claimed responsibility for the attack.
Turkey: Africa's friend, compatriot and partner
"So far we have confirmed 16 people, mostly civilians, died and 55 others were injured," Major Nur Mohamed, a police officer, told Reuters news agency on Thursday.
Another police officer, Major Farah Ali, told Reuters the hotel was now secure after the entire building was cleared of the fighters.
"National security forces are on every floor. The last fighter on the top roof [was] shot," Ali said.
Sources earlier told Al Jazeera that at least three fighters were involved in the attack.
Popular with politicians
Wednesday's attack happened shortly before the arrival of Turkish President Recep Tayyip Erdogan in Mogadishu.
Al Jazeera's Mohammed Adow, reporting from Nairobi in neighbouring Kenya, said the Ambassador Hotel is located along the road that Erdogan "was supposed to take from the airport to the presidential palace".
He said it was not the first time the hotel, popular with politicians, had been targeted.
"They want to send a message that although they might have lost control of the city, they can still carry out such attacks with audacity," he said, referring to al-Shabab.
In February, at least nine people were killed when al-Shabab fighters set off a car bomb at the gate of a popular park near another hotel in Mogadishu.
In January, an attack on a beachfront restaurant killed at least 17 people.
In recent attacks, fighters have treated civilians as "legitimate targets", Al Jazeera's Adow said.
Al-Shabab was pushed out of Mogadishu by the African Union peacekeeping force AMISOM in 2011.
However, it has remained a constant threat in Somalia, launching frequent attacks aimed at overthrowing the government.
The group has also been behind deadly attacks in Kenya and Uganda. Both contribute troops to an African Union peacekeeping force in Somalia.
Source: Al Jazeera and agencies