WATCH: Moment Istanbul’s Reina attacker arrested

The Istanbul club attacker Abdulkadir Masharipov was caught while hiding during a police operation in Esenyurt

Published: Updated:

The suspected gunman who killed 39 people in an Istanbul nightclub on New Year's Day was born in Uzbekistan and received training in Afghanistan, Istanbul Governor Vasip Sahin said on Tuesday after police caught him in a city suburb.

Sahin told reporters that the alleged attacker, whom he named as Abdulkadir Masharipov, born in 1983, had admitted his guilt and his fingerprints matched those at the scene.

There were strong indications that the suspect, who spoke four languages, had entered Turkey illegally through its eastern borders, Sahin said, adding that it was clear the attack was carried out on behalf of ISIS.

NTV television reported that Masharipov had been staying in the house belonging to a Kyrgyz friend. Hurriyet also tweeted a photo allegedly of bruised Masharipov after his capture.

ISIS has claimed responsibility for the attack that left 39 dead on New Year's day, saying it was revenge for Turkish military involvement in Syria.

Turkish Deputy Prime Minister Numan Kurtulmus on Tuesday congratulated police on capturing the gunman.

"I congratulate our police who caught the perpetrator of the Ortakoy massacre," Kurtulmus, who is also the government spokesman, said on social network Twitter. "Our war with terror and the powers behind it will continue to the end."