The Somali security forces ended an attack by militants of the Mujahideen Youth Movement on Friday on the hotel in the center of the city of Kismayo, the interim capital of the province of Jubaland in southern Somalia, killing at least 26 people.

"Twenty-six people were killed in the attack and 56 were injured. Among the dead are foreigners: three Kenyans, a Canadian, a Briton, two Americans and three Tanzanians. There are also two Chinese casualties," the head of the semi-autonomous Jubaland province said Saturday at a news conference.

The head of the region that among the dead attack as a candidate for the presidency of the region in the upcoming local elections and a number of journalists.

Witnesses said masked gunmen stormed the hotel after explosions, while tribal elders and deputies were meeting to discuss the upcoming local elections.

UN Secretary-General Antonio Guterich on Saturday condemned the attack in the Somali port city of Kismayo and underlined the solidarity of the United Nations with the Somali people.

Guterich, in a statement issued by his spokesman Stephane Dujarric, expressed condolences to the families of those who lost their lives in the attack and wished him speedy recovery.

The Mujahideen Youth Movement claimed responsibility for the attack, which targeted the hotel, according to a statement posted on the site, "Somali Mimo" of the movement.

The attack comes as Kismayo prepares to hold presidential elections to run the Juba Landa province in August.

Somalia has been waging a war for years against al-Shabaab, which was founded in early 2004, an al Qaeda-inspired armed movement that has claimed many bombings that have claimed hundreds of lives.