MOGADISHU, Somalia — A Somali cabinet minister with links to Canada is among the 15 killed in an Islamic extremist attack on a hotel in the capital, police say.

Four attackers also died in the assault which was claimed by al-Shabab, Somalia's militant rebels who are allied to al-Qaida.

State Minister for the Environment, Buri Hamza, was among those killed, said Capt. Mohamed Hussein, a senior Somali police officer. Hamza died when his hotel room collapsed Saturday because of the powerful car bomb which extremists used to blast their way into the Nasa-Hablod Hotel.

A biography on the York University website in Toronto said Hamza obtained a master of environmental studies at the school. Two media reports said Hamza lived in the Toronto-area with his family for a period of time. The office of Foreign Affairs Minister Stephane Dion could not immediately comment on Hamza's Canadian ties.

Somali soldiers stand guard on June 26, 2016 on the scene of the terror attack on a hotel in the Somali capital Mogadishu the day before and was swiftly claimed by Al-Qaeda-affiliated al-Shabab militants. (Photo: AFP/Getty Images)

At least 34 people were injured, according to police and hospital sources.

It's the second attack on a hotel since the beginning of the Muslim holy month of Ramadan in early June. Both attacks have been claimed by al-Shabab.

The attacks have raised concerns about the security of hotels in the seaside capital which has seen numerous attacks by al-Shabab in recent years.

"The trend and lethality of such attacks suggest how vulnerable the security of hotels and the city in general are now,'' said Mohamed Sheikh Abdi, a Somali political analyst.

"Many residents now shun going to hotels that provide some of the few sources of entertainment available in Mogadishu,'' he said. At hotels, patrons smoke shisha (tobacco) in water pipes, enjoy dance music and play games such as dominoes and dice.

Mogadishu resident Ahmed Ali said that he has stopped going to hotels as they are seen as "death traps because they are favourite targets for al-Shabab ... Having fun at hotels is good but my safety comes first."

President Hassan Sheikh Mohamud condemned the attacks in a statement Sunday.

With files from The Canadian Press

Clarification: This story has been updated to reflect media reports stating Buri Hamza was Canadian.