Security officers initially mistook gunmen for police colleagues until they began shooting and throwing grenades.

Somali security forces shot and killed five al-Shabab attackers after an attack that left at least three civilians and two soldiers dead in a hotel near the presidential palace in Mogadishu.

The latest attack started at 7pm local time (16:00 GMT) on Tuesday and ended at about 1am local time (22:00 GMT) on Wednesday when all five attackers were killed, Deputy Police Commissioner General Zakia Hussein said in a statement.

“The security forces ended the operation. Five people including three civilians and two soldiers died in the attack,” Hussein said.

“Eleven others were slightly injured, including nine civilians and two soldiers,” she added.

Hussein said on Tuesday 82 people, including several officials, had been rescued from the Syl hotel.

Regular attacks

Security officers initially mistook the attackers for police colleagues until they began shooting and throwing grenades, another policeman said.

Al-Shabab’s military spokesman, Abdiaziz Abu Musab, said the group’s fighters were behind the attack at the hotel compound near the presidential palace.

Somalia, in the Horn of Africa, has been embroiled in conflict and chaos since 1991, when clan-based warlords overthrew a dictator and then turned on each other.

Al-Shabab, which once controlled much of the country, was forced out of Mogadishu in 2011 and has since lost most of its other strongholds. But its fighters regularly attack sites in Somalia and neighbouring Kenya, which has troops in Somalia to battle the armed group.