OTTAWA -- Six Canadians died in an attack on a luxury hotel in Burkina Faso, Prime Minister Justin Trudeau announced Saturday.

Four jihadist attackers linked to al-Qaida were killed by Burkina Faso and French security forces hours after they stormed the Splendid Hotel and nearby Cappuccino Cafe in Ouagadougou, establishments popular with westerners in the West African country's capital.

At least 23 died in the attacks, from 18 different countries, in the attack on the Splendid Hotel and nearby Cappuccino Cafe, establishments popular with westerners in Ouagadougou.

Trudeau issued a statement strongly condemning the attack that began late Friday and ended Saturday.

"On behalf of all Canadians, we offer our deepest condolences to the families, friends and colleagues of all those killed and a speedy recovery to all those injured. We are deeply saddened by these senseless acts of violence on innocent civilians," he said in the statement.

The statement did not give any information on the identities of the Canadians. The federal government is normally prohibited from providing such information due to privacy laws.

Three attackers were killed at the hotel and a fourth was killed when security forces cleared out a second hotel nearby. Two of the three attackers at the Splendid Hotel were identified as female, President Roch Marc Christian Kabore said on national radio.

He says at least 126 hostages were freed, in part by French forces, who arrived overnight from neighbouring Mali to aid in the rescue.

The attack was launched by the same extremists behind a similar siege at an upscale hotel in Bamako, Mali in November that left 20 dead.

Burkina Faso, a largely Muslim country, had for years been largely spared from the violence carried out by Islamic extremist groups who were abducting foreigners for ransom in neighbouring Mali and Niger. Then last April, a Romanian national was kidnapped in an attack that was the first of its kind in the country.

An al-Qaida affiliate known as al-Qaida in the Islamic Maghreb claimed responsibility online as the attack was ongoing in downtown Ouagadougou at the 147-room hotel, according to the SITE Intelligence Group.

-- With files from The Associated Press.