The Islamic State group claimed responsibility Monday for a mass shooting at an Istanbul nightclub that killed 39 people, most of them foreign tourists from Muslim countries who were ringing in the new year. It was the first claim of its kind for IS in Turkey.

The group said Christian revellers were targeted in response to Turkish military operations against ISIL in northern Syria. The claim came after an IS propaganda video urging attacks on Turkey, which is home to an airbase used in the U.S.-led effort against IS in Syria and Iraq.

Nearly two-thirds of the dead in the upscale club, which is frequented by local celebrities, were foreigners, Turkey's Anadolu Agency said. Many of them hailed from the Middle East.

Citing Justice Ministry officials, Anadolu reported that 38 of the 39 dead have been identified. The report said 11 of them were Turkish nationals, and one was a Turkish-Belgian dual citizen.

The report says seven victims were from Saudi Arabia; three each were from Lebanon and Iraq; two each were from Tunisia, India, Morocco and Jordan. Kuwait, Canada, Israel, Syria and Russia each lost one citizen.

A Canadian woman killed the attack is being identified as Alaa Al-Muhandis.

Several Canadian media outlets are reporting Al-Muhandis is a 39-year-old mother of two from Milton, Ont.

She is one of the 39 people killed, most of them foreign tourists, when a gunman opened fire at the popular Reina nightclub during New Year's celebrations.

In a Facebook post Monday, Conservative leadership candidate and Milton MP Lisa Raitt expressed condolences to Al-Muhandis's family and neighbours.

Raitt wrote that "we never think that something like this can happen to us in Milton."

Prime Minister Justin Trudeau confirmed on Sunday that a Canadian had been killed, issuing a statement saying that Canada was mourning with the people of Turkey and all those who lost citizens in the attack.

"We also grive the senseless loss of a Canadian citizen and remain steadfast in our determination to work with allies and partners to fight terrorism and hold perpetrators to account," Trudeau said.

Turkish officials haven't released the names of those identified.

The nightclub assailant, armed with a long-barrelled weapon, killed a policeman and a civilian early Sunday outside the Reina club before entering and firing at some of the estimated 600 people inside.

The Islamic State group boasts of having cells in Turkey, regularly issues propaganda in Turkish and is believed to have hundreds of Turks in its ranks. But until now, the main act of aggression it had claimed in Turkey was the March 2016 killing of a Syrian journalist and an attack on riot police in the province of Diyarbakir, which Kurdish militants also claimed.

For some analysts, the claim of responsibility signalled a shift in IS strategy in Turkey, a predominantly Muslim nation.

"It's a new phase," security analyst Michael Horowitz said. "What we saw before was an undeclared war, and now we're entering an open war."

The ISIL claim said only that the attacker was a "soldier of the caliphate" who struck to "let infidel Turkey know that the blood of Muslims that is being shed by its airstrikes and artillery shelling will turn into fire on its territories."

Early Turkish media reports suggested the Istanbul nightclub gunman was probably from either Uzbekistan or Kyrgyzstan and may have been part of the same cell that staged the airport attack.

Authorities obtained the fingerprints and a basic description of the gunman and are close to identifying him, Turkish Deputy Prime Minister Numan Kurtulmus said Monday after a weekly cabinet meeting. He confirmed eight people have been detained in connection to the attack.

By attacking as the nation was celebrating the new year, the group indicated that it intends to continue being a "scourge" against Turkey in 2017, Kurtulmus said.

Initially, ISIL activity in Turkey appeared designed to stoke tensions with the country's ethnic Kurds and reflected events in Syria. The first dramatic attack came July 2015, when a suicide bomber hit a rally of activists in the border town of Suruc, at a time when Kurdish fighters in Syria where under siege just across the border in Kobane.

The worst ISIL-linked attack to rock Turkey came just months after, in October 2015, when twin suicide bombings killed 102 people at a peace rally in the capital, Ankara.

In 2016, ISIL was blamed by analysts and Turkish authorities for a wider range of attacks, including the June attack on Istanbul Ataturk Airport that killed 45 people and two other deadly bombings against tourists in Istanbul. IS was also suspected of directing an attack by a suicide bomber — possibly as young as 12 — that killed more than 50 people at an outdoor wedding in the city of Gaziantep.

A member of NATO, Turkey launched an offensive to northern Syria in August in a bid to clear a strategic border area of ISIL militants and contain the gains of Kurdish fighters. In October, Turkish-backed Syrian forces took the symbolically important town of Dabiq, which is central to ISIL propaganda. Turkish jets regularly bomb ISIL in the then town of Al-Bab, and Ankara wants to play a role in dislodging IS from its bastion in Raqqa.

"Islamic State is sending a strong message to the Turkish government that it will pay in blood for the offensive in northern Syria," Anthony Skinner, an analyst with the Verisk Maplecroft security firm, wrote in an email to The Associated Press.

Many analysts also see ISIL latest attack on Turkey as a sign of growing desperation.

The group has been threatened in al-Bab, Raqqa and Mosul in Iraq and "needs to reassert itself," said Horowitz, director at the intelligence analysis firm Prime Source.

The aggression on Turkey, he added, is in line with the group's practice of equating mass-casualty terrorism attacks with heavy bombings and airstrikes on IS-held territories.

In its claim, ISIL said the nightclub attack was aimed at Christians celebrating a pagan holiday, suggesting a symbolic choice of target that can be justified to radical Sunni Muslim supporters as punishment of sinners. But in reality, many of the victims hailed from majority-Muslim nations in the Middle East.

Max Abrahms, a Northeastern University political scientist, said ISIL understands that civilian attacks can be counterproductive in countries where it has abundant support and has avoided conflict with authorities in Turkey and Saudi Arabia. To him, the change of tact in Turkey reflects that ISIL is "desperate" in the wake of losses in Syria and Iraq.

"There's no question that Islamic State is suffering in an irreversible way," Abrahms said. So the group "is keen to commit as many attacks as possible these days and is much more likely to claim credit for them in order to signal that it has continued capability to mount operations around the world."

Also Monday, Anadolu said more than 100 Islamic State targets in Syria have been hit by Turkey and Russia in separate operations. Last week, Turkey and Russia brokered a cease-fire for Syria that excludes the ISIL and other groups considered to be terrorist organizations.

___

Hinnant reported from Paris. Associated Press writers Suzan Fraser in Ankara, Bassem Mroue in Beirut and Dominique Soguel in Vannes, France, also contributed to this report.

Keep reading

If Canadians will go to dangerous places they must accept the risk themselves. The news is filled with the stories of Canadians who get killed or injured in dangerous places. Perhaps journalists could concentrate on news that really affects Canadians instead of filling airspace and columns about these events. To report these events once or twice is enough, it is not necessary to go on for days and days.