[WATCH] Video shows first moments assailant opens fire in Istanbul nightclub

The manhunt continues for a gunman who killed 39 people in an Istanbul nightclub as Turkey marked the start of the new year

Police are continuing the hunt for the attacker as the city mourns
Police are continuing the hunt for the attacker as the city mourns

Istanbul is on high alert as the hunt for a gunman, who fled after killing 39 people at a nightclub on New Year’s Eve, continues.

The unknown assailant opened fire at Reina nightclub early on Sunday, before managing to flee amid the chaos.

The motive for the attack is not clear, but suspicion has fallen on the Islamic State group, already linked to at least two terror attacks in Turkey last year.

Following the attack, Turkish President Recep Tayyip Erdoğan vowed in a statement that Turkey would fight terrorism “till the end”.

“Turkey will stand together and not give passage to dirty games of terrorists,” he said.

President Recep Tayyip Erdogan said such groups tried "to create chaos".

"They are trying to... demoralise our people and destabilise our country," he added.

Mehmet Görmez, Turkey’s most senior Muslim cleric, condemned the attack as “savagery” and a “massacre that no Muslim conscience can accept”.

The banned Kurdistan Workers' Party (PKK) has distanced itself from the killings, with the PKK's Murat Karayilan quoted as saying it would "never target innocent civilians".

Earlier, interior minister Suleyman Soylu confirmed a "manhunt for the terrorist is under way. Police have launched operations. We hope the attacker will be captured soon."

But as the search continued, the first funerals of those killed at the nightclub were held.

More than half of those killed in the attack - which lasted seven minutes - were foreign, according to the state run Anadolu Agency.

Among them were citizens from Israel, Russia, France, Tunisia, Lebanon, India, Belgium, Jordan and Saudi Arabia.

Details continue to emerge about those killed. Canada's Prime Minister Justin Trudeau has confirmed a Canadian had died in the attack, while a US businessman named as William Jacob Raak, 35, from Delaware was reported to be among the injured.

The club, which sits on the banks of the Bosphorus, is one of Istanbul's most upmarket venues - popular with foreigners and often frequented by singers and sports stars.

The gunman entered the club a little after 1am, shot a police officer and then opened fire inside the club with a Kalashnikov rifle, before fleeing the scene.

Istanbul’s governor, Vasip Şahin, told reporters: “At 1.15am, a terrorist carrying a long-barrelled weapon martyred the police officer waiting outside, and then martyred another citizen to enter. He then carried out this violent and cruel act by spraying bullets on innocent people who were celebrating the new year.”

Police have been deployed around key areas of the city and several roads near the scene of the attack were closed off.