"They are working to destroy our country's morale and create chaos by deliberately targeting our nation's peace and targeting civilians with these heinous attacks," Erdogan said in a statement on the presidency website.
At least 39 killed in New Year gun attack at Istanbul nightclub
The attack began just over an hour into the New Year when the attacker shot dead a policeman and a civilian at the entrance to the Reina club, one of the city's most exclusive nightspots, and then went on a shooting rampage inside, Turkish officials said.
It comes after a bloody 2016 after Turkey suffered a string of terror attacks in Istanbul and elsewhere at the hands of Kurdish militants and Islamic State extremists, leaving hundreds dead. But Erdogan vowed that Turkey would continue its fight against terrorism.
Turkey 'Santa' nightclub attack: What we know
"Turkey is determined to continue to fight to the end against terror and to do whatever is necessary to ensure the security of its citizens and secure peace in the region," he said.
He added that Turkey would deploy any means, from military, economic and political to social, against "terror organisations" and the countries supporting them, without giving details on which groups or nations he was referring to.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ