The alleged assailant, named as Abdulgadir Masharipov, was found along with his four-year-old son in an apartment in the Esenyurt district of Istanbul after a massive police operation, state-run TRT television reported. Four other suspects were detained, including three women.
"The terrorist confessed his crime," Istanbul governor Vasip Sahin told reporters.
"He was trained in Afghanistan and can speak four languages. He's a well-trained terrorist," Sahin added.
The suspected mass killer was captured Monday in a police raid on an apartment in the Esenyurt district, which is on Istanbul's European side.
Authorities have been hunting the attacker for over two weeks, following the bloodbath on the glitzy Reina nightclub on the shores of the Bosphorus. The Islamic State (IS) group claimed the attack.
One Iraqi man and three women from Egypt and Africa were also detained at the same apartment, alongside the alleged assailant, the governor said.
"It is clear that the attack was carried out on behalf of Daesh," he said, using an Arabic acronym for the IS group, adding that the other four suspects were likely linked to the jihadists.
Turkish media initially reported the killer was captured with his four-year-old son, but the governor said the child was not present during the police raid.
The suspected mass killer was captured Monday in a police raid on an apartment in the Esenyurt district, which is on Istanbul's European side.
Authorities have been hunting the attacker for over two weeks, following the bloodbath on the glitzy Reina nightclub on the shores of the Bosphorus. The Islamic State (IS) group claimed the attack.
One Iraqi man and three women from Egypt and Africa were also detained at the same apartment, alongside the alleged assailant, the governor said.
"It is clear that the attack was carried out on behalf of Daesh," he said, using an Arabic acronym for the IS group, adding that the other four suspects were likely linked to the jihadists.
Turkish media initially reported the killer was captured with his four-year-old son, but the governor said the child was not present during the police raid.
The attacker had been on the run for 17 days, after slipping into the night following the attack on the glamorous Reina nightclub on the Bosphorus.
Reports had previously suggested he never left the Turkish metropolis, despite a tightening of borders in a bid to stop him escaping, triggering fears that a dangerous killer was on the loose in the city.
The Islamic State (IS) group took responsibility for the bloodbath, the first time it has ever openly claimed a major attack in Turkey.
It had previously been blamed for several strikes in Turkey this year, including the triple suicide bombings at Istanbul airport in June.
The suspect was caught in an operation jointly carried out by the Turkish police and the spy agency MIT, Turkish TV said. A 1,000 strong police squad was set up to ensure Masharipov's arrest.
Turkish media published a picture of the detained man with blood on his face and T-shirt, his neck gripped by a policeman.
Television images showed him being roughly led away, his head bent low.
He was given an obligatory health check before being taken to Istanbul's police headquarters for questioning.
Images of the suspected attacker released by police during the manhunt were taken from a chilling silent video he purportedly took on Istanbul's Taksim Square with a selfie stick, before carrying out the carnage.
'Tracked for 3 days'
There had been confusion over the identity of the attacker in the wake of the massacre, with reports initially suggesting a Kyrgyz national and then a Uighur from China.
But reports on January 8 said intelligence services and anti-terror police in Istanbul had identified him as a 34-year-old Uzbek who was part of a Central Asian IS cell.
An unidentified man is subdued, detained during a police operation to capture Reina club attacker, in Istanbul, Turkey, late Monday, Jan. 16, 2017 (AAP) Source: Depo Photos (AAP)
The investigation had also focused on the central Turkish city of Konya where the attacker was reported to have lived for several weeks after returning from Syria before moving to Istanbul.
At least 35 people have been detained before the latest raid in connection with the attack, according to Anadolu.
Of the 39 killed in the attack on the glamorous nightclub, 27 were foreigners including citizens from Lebanon, Saudi Arabia, Israel, Iraq and Morocco who had been hoping to celebrate a special New Year.
The attack, just 75 minutes into 2017, rocked Turkey which had already been shaken by a string of attacks in 2016 blamed on jihadists and Kurdish militants that left hundreds dead.
Turkey had been accused by its Western allies of not doing enough to halt the rise of IS but the charges are denied by the Turkish authorities, who note the group has been listed as a terror organisation in the country since 2013.
Related reading
Turkey identifies Istanbul gunman, makes new arrests