On January 1st, 2017, a gunman opened fire on New Year revelers at a packed nightclub on the shores of Istanbul’s Bosphorus waterway on Sunday killing at least 39 people.

Security services had been on alert across Europe for new year celebrations following an attack on a Christmas market in Berlin that killed 12 people. Only days ago, an online message from a pro-Islamic State group called for attacks by “lone wolves” on “celebrations, gatherings and clubs.”

UPDATED: Islamic State claimed responsibility on Monday for a New Year’s Day mass shooting in a packed Istanbul nightclub that killed 39 people, an attack carried out by a lone gunman who remains at large.

It described the Reina nightclub, where many foreigners as well as Turks were killed, as a gathering point for Christians celebrating their “apostate holiday”. The attack, it said, was revenge for Turkish military involvement in Syria.

“The apostate Turkish government should know that the blood of Muslims shed with airplanes and artillery fire will, with God’s permission, ignite a fire in their own land,” the Islamic State declaration said.

The Hurriyet newspaper cited witnesses as saying the attackers shouted in Arabic as they opened fire at Reina.

“We were having fun. All of a sudden people started to run. My husband said don’t be afraid, and he jumped on me. People ran over me. My husband was hit in three places,” one club-goer, Sinem Uyanik, told the newspaper.

“I managed to push through and get out, it was terrible,” she said, describing seeing people soaked in blood.

The incident bore echoes of an attack by militant Islamists on Paris’s Bataclan music hall in November 2015 that, along with assaults on bars and restaurants, killed 130 people.

Interior Minister Suleyman Soylu said 15 or 16 of those killed at Reina were foreigners but only 21 bodies had so far been identified. He told reporters 69 people were in hospital, four of them in critical condition.

“A manhunt for the terrorist is underway,” he said.

Nationals of Saudi Arabia, Morocco, Lebanon, Libya, Israel and Belgium were among those killed, officials said. France said three of its citizens were wounded.

Turkey is part of the U.S.-led coalition against Islamic State and launched an incursion into Syria in August to drive the radical Sunni militants from its borders. It also helped broker a fragile ceasefire in Syria with Russia.

“As a nation, we will fight to the end against not just the armed attacks of terror groups, but also against their economic, political and social attacks,” President Tayyip Erdogan said in a written statement.

“They are trying to create chaos, demoralize our people, and destabilize our country … We will retain our cool-headedness as a nation, standing more closely together, and we will never give ground to such dirty games,” he said.

There has been no claim of responsibility, but Erdogan linked the attacks to developments in the region where Turkey faces conflict across its frontier in Syria and Iraq. Some three million Syrian refugees currently live on Turkish soil.

The Reina club is one of Istanbul’s best known nightspots, popular with locals and foreigners. Some 600 people were thought to have been inside when the gunman shot dead a policeman and civilian at the door, forced his way in and then opened fire.

Istanbul Governor Vasip Sahin said the attacker used a “long-range weapon” to “brutally and savagely” fire on people, apparently referring to some form of assault rifle.

U.S. President Barack Obama, on vacation in Hawaii, expressed condolences and directed his team to offer help to the Turkish authorities, the White House said.

“I didn’t see who was shooting but heard the gun shots and people fled. Police moved in quickly,” Sefa Boydas, a Turkish soccer player, wrote on Twitter.

“My girlfriend was wearing high heels. I lifted her and carried her out on my back,” he said.

Hurriyet quoted Reina’s owner, Mehmet Kocarslan, as saying security measures had been taken over the past 10 days after U.S. intelligence reports suggested a possible attack.

Turkey faces multiple threats including spillover from the war in Syria. Beside its cross-border campaign against Islamic State, it is fighting Kurdish militants in its southeast.

The New Year’s Day attack came five months after a failed military coup, in which more than 240 people were killed, many of them in Istanbul, as rogue soldiers commandeered tanks and fighter jets in a bid to seize power.

Turkey has seen repeated attacks in recent weeks. On Dec. 10, two bombs claimed by Kurdish militants exploded outside a soccer stadium in Istanbul, killing 44 people.

A car bomb killed at least 13 soldiers and wounded 56 when it ripped through a bus carrying off-duty military personnel in the central city of Kayseri a week later, an attack Erdogan also blamed on Kurdish militants.

The Russian ambassador to Turkey was shot dead as he gave a speech in Ankara on Dec. 19 by an off-duty police officer who shouted “Don’t forget Aleppo” and “Allahu Akbar.”

In June, around 45 people were killed and hundreds wounded as three suspected Islamic State militants carried out a gun and bomb attack on Istanbul’s main Ataturk airport.