ISTANBUL -- The Islamic State group on Monday claimed responsibility for the New Year's Day attack at a popular Istanbul nightclub that killed 39 people and wounded scores of others.
The IS-linked Aamaq News Agency said the attack was carried by a "heroic soldier of the caliphate who attacked the most famous nightclub where Christians were celebrating their pagan feast."
It said the man opened fire from an automatic rifle and also detonated hand grenades in "revenge for God's religion and in response to the orders" of IS leader Abu Bakr al-Baghdadi.
The group described Turkey as "the servant of the cross" and also suggested it was in retaliation for Turkish military offensives against the Islamic State group in Syria and Iraq.
"We 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," the statement said.
Earlier, Turkish media reports had said that Turkish authorities believed the IS group was behind the attack and that the gunman, who is still at large, comes from a Central Asian nation and is likely to be either from Uzbekistan or Kyrgyzstan.
According to Hurriyet and Karar newspapers, police had also established similarities with the high-casualty suicide bomb and gun attack at Istanbul's Ataturk Airport in June and was investigating whether the same IS cell could have carried out both attacks.
The gunman killed a policeman and another man outside the Reina club in the early hours of 2017 before entering and firing at an estimated 600 people partying inside with an automatic rifle.
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 and 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.
Relatives of the victims and embassy personal were seen walking into an Istanbul morgue to claim the bodies of the deceased.
Turkish officials haven't released the names of those identified.
The mass shooting followed more than 30 violent acts over the past year in Turkey, which is a member of the NATO alliance and a partner in the U.S.-led coalition fighting against the Islamic State group in Syria and Iraq.
The country endured multiple bombings in 2016, including three in Istanbul alone that authorities blamed on IS, a failed coup attempt in July and renewed conflict with Kurdish rebels in the southeast.
The Islamic State group claims to have cells in the country. Analysts think it was behind suicide bombings last January and March that targeted tourists on Istanbul's iconic Istiklal Street as well as the attack at Ataturk Airport in June, which killed 45 people.
In August, Turkey sent troops and tanks into northern Syria, to clear a border area from the IS and also curb the territorial advances of Syrian Kurdish forces in the region. The incursion followed an IS suicide attack on an outdoor wedding party in the city of Gaziantep, near the border with Syria, that killed more than 50 people.
In December, IS released a video purportedly showing the killing of two Turkish soldiers and urged its supporters to "conquer" Istanbul. Turkey's jets regularly bomb the group in the northern Syrian town of Al-Bab. Turkish authorities haven't confirmed the authenticity of the video.
Last week, Turkey and Russia brokered a cease-fire for Syria that excludes the IS and other groups considered to be terrorist organizations.
On Monday, Anadolu said more than 100 Islamic State targets in Syria have been hit by Turkey and Russia in separate operations.
Citing the Turkish Chief of General Staff's office, Anadolu said Turkish jets struck eight IS group targets while tanks and artillery fired upon 103 targets near Al Bab, killing 22 extremists while destroying many structures. The Russian jets also attacked IS targets in Dayr Kak, five miles southwest of Al Bab.
Prime Minister Binali Yildirim said the attacker left a gun at the club and escaped by "taking advantage of the chaos" that ensued. Some customers reportedly jumped into the waters of the Bosporus to escape the attack.
Bassem Mroue reported from Beirut. Suzan Fraser in Ankara and Cinar Kiper in Istanbul contributed to this report.
Copyright (2017) Associated Press. All rights reserved. This material may not be published, broadcast, rewritten, or redistributed.