fighters attacked a hotel in the Somali capital in a hail of gunfire and explosions on Friday, with casualties reported, security sources and witnesses said.
The assault on the Hayat Hotel triggered a fierce gunfight between security forces and gunmen from the jihadist group who are still holed up inside the building, security official Abdukadir Hassan told AFP.
The -linked jihadist group, which has been waging a deadly insurgency against Somalia's fragile central government for about 15 years, claimed responsibility.
Ambulance officials gave an injury toll of three, while witnesses at the scene at an intersection known as KM4 reported another two had been wounded.
"A huge blast went off a few minutes before the gunmen forced their way into the hotel," Hassan said.
"We don't have the details so far but there are casualties, and the security forces are now engaging with the enemy who are holed up inside the building," he added.
Somali police spokesman Abdifatah Adan Hassan later told reporters that the initial blast was caused by a suicide bomber who attacked the hotel with several other gunmen.
The assailants "are now being engaged by the police forces, they will be neutralised very soon", he said.
It was not immediately clear if security forces had taken back control of the hotel and if the attack was over.
Witnesses said a second blast occurred outside the hotel just a few minutes after the first, inflicting casualties on rescuers and members of the security forces and civilians who rushed to the scene after the first explosion.
"The area is cordoned off now and there is exchange of gunfire between the security forces and the gunmen," said one witness, Mohamed Salad.
The militants claimed the attack in a brief statement on a pro-Shabaab website.
"A group of Al-Shabaab attackers forcibly entered Hotel Hayat in Mogadishu, the fighters are carrying out random shooting inside the hotel," the group said in a brief statement on a pro-Shabaab website.
The Hayat is a popular spot in Mogadishu in an area where several other hotels are located, and it is frequented by government officials and civilians.
Earlier this week, the United States announced that its forces had killed 13 Al-Shabaab fighters in an air strike in the central-southern part of the country as the Islamist militants were attacking Somali forces.
The US has carried out several air raids on the militants in strikes in recent weeks.
In May, President Joe Biden ordered the reestablishment of a to help local authorities combat Al-Shabaab, reversing a decision by his predecessor Donald Trump to withdraw most US forces.
In recent weeks, Al-Shabaab fighters have also waged attacks on the Somalia-Ethiopia border, raising concerns about a possible new strategy by the Islamist militants.
Somalia's new President Hassan Sheikh Mohamud said last month that ending Al-Shabaab's insurgency required more than a military approach, but that his government would negotiate with the group only when the time is right.
Al-Shabaab fighters were driven out of the capital in 2011 by an African Union force, but the group still controls swathes of countryside.
It continues to wage deadly strikes on civilian and military targets, with hotels a quite frequent target.
Earlier this month, Somalia's new Prime Minister Hamza Abdi Barre announced the appointment of the group's former deputy leader and spokesman, Muktar Robow, as religion minister.
Robow, 53, publicly defected from Al-Shabaab in August 2017, with the US government at one point offering a $5-million bounty for his capture.
The Horn of Africa nation has been mired in chaos since the fall of the military regime of President Siad Barre in 1991.
His ouster was followed by a civil war and the ascendancy of Al-Shabaab.
The deadliest attack in Somalia occurred in October 2017 when a truck packed with explosives blew up in a bustling commercial district of Mogadishu, killing 512 people.