Turkish interior minister Suleyman Soylu said 15 foreign nationals had been identified among the dead at the Reina nightclub in Istanbul.
The “terrorist” was still at large after striking alone in the attack, in which he changed clothes and injured a further 69 people in the early hours of Sunday, Mr Soylu said.
“This was a massacre, a truly inhuman savagery,” he added.
The Foreign Commonwealth Office (FCO) said UK tourists should follow the advice of local authorities while remaining vigilant.
Istanbul governor Vasip Sahin said the “terror attack” began when the assailant, armed with a long-barrelled weapon, killed a policeman and a civilian outside the club.
The attacker then entered the club in the Ortakoy district and fired at partygoers at around 1.45am local time, Mr Sahin said.
“Unfortunately (he) rained bullets in a very cruel and merciless way on innocent people who were there to celebrate New Year’s and have fun,” he added.
The FCO was attempting to find out whether any British nationals were injured in the attack at the club, where more than 500 revellers were seeing in 2017.
A spokesman said: “We are in touch with the local authorities following reports of an incident at a night club in Istanbul.”
Five of the dead have been identified as Turkish nationals, up to four of which were working in the club, while authorities are yet to identify 19 others.
Clubbers reportedly jumped into the waters of the Bosporus strait to escape to flee the attacker.
Eyewitness Sinem Uyanik said her husband Lutfu Uyanik was wounded in the attack.
“Before I could understand what was happening, my husband fell on top me,” she said outside Istanbul’s Sisli Hospital.
“I had to lift several bodies from on top of me before I could get out.”
Officers in riot gear and armed with machine guns were backed up by armoured vehicles to secure the area surrounding the club, which is one of the most popular spots in the city.
Security in Turkish cities had been heightened with 17,000 police officers, some camouflaged as Santa Claus, on duty in Istanbul, state news agency Anadolu said.
Terrorists from the Islamic State group and Kurdish rebels targeted Istanbul and Ankara several times inflicting a death toll of more than 180 in 2016.
Turkish-backed rebel groups in Syria have been targeting IS militants.
The White House condemned the “horrific terrorist attack” and offered US help to Turkey.
The attack on civilians celebrating the New Year in an Istanbul nightclub was the latest in a long line of assaults in Turkey in the past year. Here are some of the most significant attacks.
:: January 12, Istanbul: A suicide bomber killed 12 German tourists in an attack that authorities said was linked to Islamic State (IS).
:: February 17, Ankara: A suicide car bomb apparently targeting military personnel killed 29 people. It was claimed by TAK, an offshoot of the Kurdistan Workers’ Party.
:: March 13, Ankara: A Kurdish woman killed 37 people when she blew herself up in a car at a transport hub. It was also claimed by TAK.
:: June 28, Istanbul’s Ataturk Airport: A trio of suicide bombers armed with assault rifles slaughtered 44 people and wounded nearly 150.
:: August 20, Gaziantep: A suicide bomber as young as 12 killed at least 51 people at a Kurdish wedding party in an attack suspected of being directed by IS.
:: December 10, Istanbul: A double bomb attack outside football stadium killed 44 people and wounded 149.
:: December 19, Ankara: A Turkish riot police officer assassinated Russia’s ambassador to the country at a photo exhibition.