Somali security forces were trying to dislodge a group of jihadist fighters who stormed a hotel in the capital Mogadishu popular with politicians and army officers, police said Tuesday.
The attack began at around 7:00 pm (1600 GMT), when a gun battle broke out between the jihadists and members of the security forces guarding checkpoints leading to the nearby presidential palace.
Several sources told AFP that the attackers had managed to get inside the SYL hotel.
"The security forces are fighting a number of gunmen who have been holed up inside the hotel premises, but very soon, they will end the siege," police officer Ibrahim Mohamed said.
"We don't have the exact number of the attackers so far but I saw the dead bodies of two," he added.
A little earlier, security official Abdirahman Adan reported "a heavy exchange of gunfire and grenade explosions".
And the al-Shabaab Islamist group posted a statement online Tuesday, saying it had carried out an operation "which happened as planned". It gave no further details.
Several witnesses described scenes of panic as the attack broke out.
Gunfire and grenade blasts
"There is still gunfire inside the hotel building and sometimes grenade blasts...," said one witness, Ali Moalim Nur.
"Three of my friends were inside the hotel when the attack started, but luckily they have escaped," he added. Only one of them was injured, suffering a fracture after jumping off a wall, he said.
Another witness, Abdukadir Ahmed, told AFP: "I was close to the hotel when the gunfire broke out and we managed to turn our vehicle swiftly.
"The security forces around the palace checkpoints were firing heavy machine-guns but we don't exactly know who was fighting who," he added.
The SYL hotel is close to the main entrance to the Villa Somalia government complex, a high-security area that includes the presidential palace, the prime minister's office and ministry buildings.
The hotel, which is popular with government officials, business people and visiting diplomats and delegations, has suffered three previous deadly attacks, all claimed by the al-Shabaab group.
The first, in January 2015, killed five people when a suicide car bomber rammed the hotel gates on the eve of a visit by Turkey's President Recep Tayyip Erdogan.
In February 2016, twin blasts set off close to the hotel and the neighbouring Peace Garden killed 14 people.
Then in August of the same year, a suicide car bomb attack on the hotel killed 15 people and caused extensive damage.
The Al-Qaeda aligned jihadist group was forced out of the capital in 2011.
But Shabaab still control parts of the countryside and continues to launch attacks against government, military, civilian and foreign targets in Mogadishu, often striking the city's most prominent hotels and restaurants.
The jihadists have also staged repeated attacks in neighbouring Kenya.