At least 25 people were killed, including two members of parliament, and 40 injured in an attack by al-Shabab fighters on a luxury hotel in the Somali capital Mogadishu, police sources say.

The Central Hotel in the heart of Mogadishu was hit by two car bomb explosions, followed by heavy gunfire after attackers stormed into the building, police officers said.

Al Jazeera has learned that the deputy mayor of Mogadishu, as well as two members of parliament were killed.

A government spokesman told Al Jazeera that contrary to earlier reports, the deputy prime minister was unhurt.

Analysis: Al-Shabab's deadly attack in Mogadishu

Al-Shabab claimed responsibility for the raid in a phone call to Al Jazeera.

The group claimed it had killed more than 20 senior government officials in attack.

"We have killed more than 20 senior officials working for the apostate government. They gathered thinking they were safe from the mujahideen," Abdiaziz abu Musab, al-Shabab military operations spokesman, told Al Jazeera.

"We hear gunshots inside. I am afraid the attackers have also gone inside the hotel," police captain Farah Abdullahi told the Reuters news agency.

Another police officer also said attackers had entered the building and that government ministers and MPs were inside the hotel when it was attacked.

January hotel attack

Friday's assault was the second on a hotel in Mogadishu in less than a month. On January 22, three Somali nationals were killed when a suicide car bomber blew himself up at the gate of a hotel housing the advance party of the Turkish President Recep Tayyip Erdogan who visited the country days later.



A Somali intelligence official said that the Turkish delegation of around 70 members was staying at the hotel at the time of the attack but were unharmed.

This latest hotel assault by the rebel group comes a day before the Djiboutian president is expected to visit the Somali capital.

Despite major setbacks in 2014, al-Shabab continues to wage a deadly campaign against Somalia's government and remains a threat in Somalia and the East African region.

The group has carried out many attacks in Somalia and in neighbouring countries, including Kenya, whose armies are part of the African Union peacekeeping mission known as AMISOM.

Al-Shabab controlled much of Mogadishu during the years 2007 to 2011, but was pushed out of Somalia's capital and other major cities by the AU forces.