Reports say the shooter was dressed as Santa Claus.
Some in the upmarket Reina nightclub jumped into the waters of the Bosphorus to try to escape the carnage and were rescued by police. The club lies on the European side of the Bosphorus Strait, which splits Istanbul in two.
A manhunt is now underway for the killer, in an attack Turkish officials say was an act of terrorism.
“39 people have lost their lives, 21 of them have been identified,” Turkey’s Interior Minister Suleyman Soylu told reporters.
“We are still working on the identification of the other 18. Fifteen-sixteen (corrects himself as sixteen) are foreign nationals.”
Ortaköy'de ünlü gece kulübü Reina'da silahlı saldırı...— Habertürk TV (@HaberturkTV) 31 dicembre 2016
Yaralıların olduğu belirtiliyor
İşte olay yerinden ilk görüntüler pic.twitter.com/vc1rJdxMik
Istanbul Governor Vasip Şahin labelled the shooting a terrorist attack.
“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,” Şahin told the media.
Television footage showed ambulances and police vehicles outside the venue in the Ortaköy district of the city.
Wielding a Kalashnikov, the attacker reportedly opened fire on police outside the club at around 1.15 am local time, killing at least one police officer and one civilian. The shooter is said to have shot their way into the venue and began firing at random.
Among the up to 800 people inside the upmarket Reina nightclub, some witnesses said there were multiple attackers, shouting in Arabic.
A total of 65 people were wounded in the gun rampage. Four are in a critical condition.
Turkey’s Hurriyet newspaper 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.
Police, special forces and explosives experts have carried out a search of the building, according to local television channel NTV.
US President Barack Obama has directed his team to offer “appropriate assistance to the Turkish authorities,” the White House says.
2017 starts with an attack in #Istanbul. Our thoughts are with victims and their loved ones. We continue to work to prevent these tragedies— Federica Mogherini (@FedericaMog) 1 gennaio 2017
“This afternoon the president was briefed by his national security team on the attack in Istanbul,” said spokesman Eric Shultz in a statement.
“The president expressed condolences for the innocent lives lost, directed his team to offer appropriate assistance to the Turkish authorities, as necessary, and keep him updated as warranted.”
The EU’s Foreign Affairs chief, Federica Mogherini, also expressed support for the victims, their families and their friends.
NATO Secretary-General Jens Stoltenberg expressed his condolences and condemnation.
Shortly after the attack, police were reportedly ordered to temporarily close all nightclubs in Istanbul.
A blackout has been imposed on national media coverage of the shooting.
It marks a bloody start to 2017 for a country hit repeatedly by terrorism last year – with attacks blamed on ISIL and Kurdish militants.
Turkey is a NATO member and part of the US-led coalition against the so-called Islamic State group.
It launched a military incursion into Syria in August against the radical Islamist group and is also fighting a Kurdish militant insurgency in its own southeast. (Euronews)