Al-Qaeda-affiliated al-Shabaab quickly claimed responsibility for the attacks – claiming to have killed 20 people.
Police Officer Major Ibrahim Hassan was quoted by Reuters as saying that “Lawmakers Mohamud Mohamed and Abdullahi Jamac died in the hotel.”
Sheikh Abdiasis Abu Musab, al Shabaab’s military operations spokesman, told Reuters they had lost three fighters during the hotel attack and killed 30 people.
One of the three dead fighters drove the car that rammed the hotel while the others stormed the hotel, al Shabaab said.
The attack happened shortly before the arrival of Turkish President Recep Tayyip Erdogan in Mogadishu.
Somali President Hassan Sh. Mohamud and Premier Omar Abdirashid condemned the terrorist attack.
Al-Shabab, which is battling the UN-backed government, was driven from Mogadishu in 2011 but still remains a potent threat and frequently carries out attacks in the city.
The government, with the help of African Union forces, is fighting the al-Qaeda-linked group to regain control of the war-torn country.
Earlier on Wednesday, the government announced it had killed Mohamed Kuno, the al-Shabab militant who led the attack on Garissa University in Kenya in April 2015 that killed 148 people.