The Istanbul nightclub attacker, who killed 39 people on New Year's Eve, was an Uzbek national who trained in Afghanistan, Turkish officials have said, adding that the Islamic State (Isis/Daesh) gunman had confessed to the shooting just hours after he was captured.

Istanbul's governor Vasip Sahin confirmed in a press conference the nightclub attacker's identity as Abdulkadir Masharipov saying he had been born in 1983. He added that Masharipov's fingerprints matched those found at the scene of the shooting at the Reina nightclub.

Turkish Prime Minister Binali Yildirim said at an earlier press conference that he hoped now Masharipov had been captured that the "forces" behind the attack would be laid bare, the Associated Press reported.

"The vile terrorist who attacked the place of entertainment on New Year's Eve and led to the loss of so many lives has been captured," Yildirim said.

"What is important is for the suspect to be captured and for the forces behind it to be revealed," he added.

Turkish officials said the suspect was an educated man who spoke four languages. They say it is clear he carried out the attack in the name of IS.

Masharipov was able to evade Turkish authorities for two weeks before he was caught, despite his face being broadcast around the world after a video he shared was released on the internet.

As part of the police operation to catch the fugitive, police have said they reviewed 7,200 hours of security camera footage. Two thousand police officers were involved in the manhunt, and $200,000 (£164,000) uncovered during Masharipov's arrest.

Vasip Sahin
Istanbul Governor Vasip Sahin, accompanied by police chief Mustafa Caliskan, talks to the media at the police headquarters in Istanbul Reuters

According to local press, the Uzbek suspect was arrested during a raid on a luxury residential building along with a man from Kyrgyzstan and three women from Somalia, Senegal and Egypt.

The man's four-year-old son who was also present at the time of the attack has been taken into protective custody. On 12 January Masharipov's wife and his one-year-old daughter were also stopped and detained by police.