Turkish police have released a photo of the main suspect in the New Year's Eve attack on a popular nightclub in Istanbul that killed 39 people.

The release of the image on Monday came as Deputy Prime Minister Numan Kurtulmus said that the country's state of emergency - which was already in place at the time of the attack - would be extended for as long as needed.

Kurtulmus also said authorities were close to identifying the gunman after obtaining his fingerprints and a description of his appearance.

The attack, claimed by the Islamic State of Iraq and the Levant (ISIL, also known as ISIS), also wounded dozens.

TIMELINE: Attacks in Turkey

"Information about the fingerprints and basic appearance of the terrorist have been found. In the process after this, work to identify him swiftly will be carried out," Kurtulmus told a news conference.

He said it was clear that Turkey's military incursion into Syria, launched in August, had annoyed armed groups and those behind them, but said the offensive would continue until all threats to Turkey were removed.

Turkey sent tanks and special forces into Syria just over four months ago to push back ISIL fighters from its border and prevent Kurdish fighters from taking ground in their wake.

Kurtulmus also said Sunday's attack bore significant differences to previous attacks in Turkey and that it had been carried out to create divisions within Turkish society.

The assailant slipped from the scene of the attack at the Reina club early on Sunday, taking advantage of the chaos that ensued after he opened fire.

Newspaper reports said the attacker was thought to be from a Central Asian nation.

Turkish media ran on Tuesday a selfie-style video of a man they say is the gunman. Broadcast on Turkish television, the footage shows the alleged attacker filming himself at Taksim square. It was not immediately clear if it was filmed before the attack.

Foreigners killed

As the operation to close in on the suspect continued, Turkish victims were laid to rest as families of those from other countries arrived in the country to take their loved ones' remains back home.

The majority of those killed were foreigners, include many Arab nationals.

The victims included citizens of Turkey, Saudi Arabia, Lebanon, Iraq, France, Tunisia, India, Morocco, Jordan, Kuwait, Canada, Israel, Syria, Belgium, Germany and Russia.

Restaurant owners/staff march in #Istanbul in solidarity w #Reina Nightclub. 1 man told me there is fear more attacks will happen in #Turkey pic.twitter.com/XFQGAaPnme — Mohammed Jamjoom (@MIJamjoom) January 3, 2017

Among them was a police officer and a security guard employed to keep partygoers safe, a tour guide escorting visitors during a night on the town and young adults who had travelled to Turkey for the holidays.

Tuvana Tugsavul, who worked at the nightclub, witnessed the attack.

"I saw the gun shootings, the flames, and then I went to the toilet. There was about eight or nine people in one small cabin. I'm just thinking, it could be me too. It could be me," she told Al Jazeera as she attended the funeral of 23-year-old Yunus Gormek, who had gone to Reina to help his uncle with work.

Mehmet Kocarslan, who owns Reina, also attended the funeral as a gesture of solidarity.

"I wanted to show my respect and show we care for them. I will visit the hospitals after the funeral. It is really so painful," he said.