A gunman dressed in a Santa Claus costume has shot his way into an Istanbul nightclub packed with hundreds of New Year's revellers, killing at least 39 people and wounding at least 69 more in what the city governor says is a terrorist attack.
One assailant shot a police officer and a civilian as he entered the Reina nightclub before opening fire at random inside, Istanbul Governor Vasip Sahin said at the scene. Some reports suggested there were multiple attackers.
"A terrorist with a long-range weapon ... brutally and savagely carried out this attack by firing bullets on innocent people who were there solely to celebrate the New Year and have fun," Sahin told reporters on Sunday (local time).
At least 16 of the dead were foreign nationals, authorities say, without providing information on their nationalities. Five of the victims were identified as Turkish nationals while 18 other victims were not yet identified.
The attack again shook Turkey as it tries to recover from a failed July coup and a series of deadly bombings in cities including Istanbul and the capital Ankara, some blamed on Islamic State and others claimed by Kurdish militants.
The club, one of Istanbul's most iconic - popular with locals and foreigners alike - overlooks the Bosphorus Strait separating Europe and Asia in the city's cosmopolitan Ortakoy district.
Around 500 to 600 people were thought to have been inside when the gunman opened fire early on Sunday, broadcaster CNN Turk said. Some jumped into the waters of the Bosphorus to save themselves and were rescued by police.
The White House condemned the "horrific terrorist attack" and offered US help to Turkey.
US President Barack Obama, on vacation in Hawaii, expressed condolences after being was briefed on the attack by his national security team.
Sahin said there was only one attacker but other reports, including on social media, suggested there may have been at least two, dressed in Santa Claus costumes which they later ditched.
The Hurriyet newspaper cited witnesses as saying there were multiple attackers and that they shouted in Arabic.
"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 and adding that there appeared to have been at least two gunmen.
Dozens of ambulances and police vehicles were dispatched to the club in Ortakoy, a neighbourhood on the city's European side nestled under one of three bridges crossing the Bosphorus and home to nightclubs, restaurants and art galleries.
"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 US intelligence reports suggested a possible attack.
Turkey, a NATO member and part of the US-led coalition against Islamic State, faces multiple security threats including spillover from the war in neighbouring Syria.
The New Year's Eve attack came five months after Turkey was shaken by 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.