0939 GMT August 24, 2019
A suicide bomber rammed a vehicle loaded with explosives into the Medina hotel in the port town of Kismayo on Friday before several heavily armed gunmen forced their way inside, shooting as they went, authorities said.
The siege lasted for almost 12 hours and only ended on Saturday morning after clashes with security forces.
Three Kenyans, three Tanzanians, two Americans, one British and one Canadian were among the 26 people killed in the attack, President Ahmed Mohamed Islam of the semi-autonomous Jubaland region told a news conference.
"There are also two wounded Chinese citizens," he added.
"The security forces are in control now and the last terrorist was shot and killed", Mohamed Abdiweli, a security official, said.
"There are dead bodies and wounded people strewn inside the hotel," Abdiweli said.
He said authorities believed four gunmen, who one witness described as wearing Somali police uniforms, were involved in the attack.
Al-Shabaab, the Al-Qaeda-linked group, claimed responsibility for the siege.
Kismayo is the commercial capital of Jubbaland, a region of southern Somalia still partly controlled by Al-Shabaab.
A resident Osman Nur said that the explosion had destroyed huge parts of the hotel and nearby businesses and security forces were deployed all over the city.
"There is chaos inside, I saw several dead bodies carried from the scene and people are fleeing from the nearby buildings," witness Hussein Muktar said during the assault.
"The blast was very big," he added.
The attack is the latest in a long line of bombing and assaults claimed by Al-Shabaab.
According to several sources, most of those staying in the hotel were politicians and traders ahead of upcoming regional elections.
The dead included a presidential candidate for August’s regional elections, the regional president said. At least two journalists and a UN agency staff member were also reported to have been killed.
"The whole building is in ruins, there are dead bodies and wounded who have been recovered from inside. The security forces have cordoned off the whole area," said witness Muna Abdirahman.
Al-Shabaab militants have fought for more than a decade to topple the Somali government.
The militant group once controlled central and southern Somalia and are variously estimated to number between 5,000 and 9,000 men.
In 2010, Al-Shabaab declared their allegiance to Al-Qaeda.
In 2011, they fled positions they once held in Mogadishu, and have since lost many strongholds.
But they retain control of large rural swathes of the country and continue to wage a guerrilla war against the authorities.
AFP and Reuters contributed to this story.