Istanbul (AFP) - A 34-year-old Uzbek man suspected of slaughtering 39 people at an Istanbul nightclub on New Year's Eve confessed to the massacre on Tuesday, hours after his capture in a police raid.
Authorities detained Abdulgadir Masharipov, who spent 17 days on the run after the attack claimed by Islamic State (IS) jihadists, along with three women and an Iraqi man during a massive police operation in Istanbul.
"The terrorist confessed his crime," Istanbul governor Vasip Sahin told reporters. He said the fingerprints matched those of the attacker and confirmed he is an Uzbek national.
"He was trained in Afghanistan and can speak four languages. He's a well-trained terrorist," added the governor, saying Masharipov is believed to have first entered Turkey in January 2016.
Police also confiscated 197,000 US dollars (185,000 euros), two firearms and clips during the raid on an apartment, he added.
The arrest eased the anxiety of Istanbul residents, already on edge after a string of attacks, who had feared for more than a fortnight that a trained killer was on the loose in the city.
Local media published a picture of the detained man with blood on his face and T-shirt, his neck gripped by a policeman.
President Recep Tayyip Erdogan hailed the arrest and congratulated the security forces.
"From now on in this country, nobody will get away with what they have done," he said in a speech in Ankara. "Everyone will be brought to account within the rule of law."
- 'Like a nightmare' -
The operation to find the whereabouts and capture the suspected jihadist involved some 2,000 police officers, the Istanbul governor said.
The suspect had apparently slipped into the night following the attack on the glamorous Reina nightclub on the Bosphorus, as police tightened borders to prevent him escaping.
But he was hiding in the working-class, densely populated western districts of Istanbul. Days of police tracking eventually traced him to an apartment in the residential Esenyurt district.
An Iraqi man was also detained with him, as well as three women, one a Egyptian citizen and two others from African states, Sahin said.
Police allowed reporters into the apartment, which had been thrown upside down during the 20 minute raid to apprehend the suspected extremist.
Drawers were flung open and clothes thrown onto the floor. But there were also tantalising glimpses of daily life like handwritten notes and a half-eaten loaf of bread.
"It is like a nightmare, this man was living under the same roof and we didn't know it," said neighbour Sezen Aras.
The IS extremist 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, including the triple suicide bombings at Istanbul airport in June.
Capturing the suspect alive will be seen as a major victory for the Turkish security forces and he may be able to shed light on the existence of other IS cells in the city.
Prime Minister Binali Yildirim said: "What matters is the capture of the perpetrator of this vile attack and exposing the powers behind him."
- 'Tracked for 3 days' -
There had been confusion over the attacker's identity in the wake of the massacre, with reports initially suggesting a Kyrgyz national and then a Uighur from China was responsible.
But authorities later identified him as a 34-year-old Uzbek who was part of a Central Asian IS cell using the code name Ebu Muhammed Horasani.
Images 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.
According to NTV television, the police had spotted his location three days earlier, but preferred to track him to identify his contacts.
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.
A total of 50 people have now been detained in the investigation as a result of 152 raids since the attack, Sahin said.
Of the 39 killed in the Reina attack, 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 series of attacks in 2016 blamed on jihadists and Kurdish militants that has left hundreds dead.