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's governor has said after police caught the suspect in a city suburb.

Key points:

Masharipov was arrested with his four-year-old son in Istanbul's Esenyurt district

Police say he is responsible for attack that killed 39 people on New Year's Day

Governor Vasip 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, Mr Sahin said, adding that it was clear the attack was carried out on behalf of Islamic State.

The police operation to apprehend him drew on the review of 7,200 hours of security camera footage and involved around 2,000 police officers, including special units, the governor said. Authorities seized nearly $US200,000 ($265,340) during the suspect's arrest.

The state-run Anadolu Agency said that a man from Kyrgyzstan and three women — from Somalia, Senegal and Egypt — were also detained in the raid, while the gunman's four-year-old son was taken into protective custody.

Anadolu said police have also carried out raids on members of a suspected Uzbek IS cell in five Istanbul neighbourhoods, and detained several people.

Photographs from raids, widely published in the Turkish media, showed a bruised, black-haired man in a grey, bloodied T-shirt being held by his neck. NTV television said the gunman had resisted arrest.