The man suspected of carrying out the new year’s eve attack on a nightclub in the Turkish city was trained in Afghanistan.
Istanbul Governor Vasip Sahin said the man, named earlier as Uzbek National Abdulkadir Masharipov, was believed to have entered Turkey in January 2016.
Sahin said the suspect had confessed to the attack and that his fingerprints matched those found at the scene.
Thirty-nine people including foreigners died in the attack on the Reina club with dozens wounded.
So-called Islamic State said it was behind the attack, saying it was revenge for Turkish military involvement in Syria.
Police arrested the man on Monday evening in a raid on an address in the Istanbul suburb of Esenyurt.
Another man and three women were also detained.
A picture of Abdulkadir Masharipov taken shortly after his arrest showed him being held by the neck by an officer with his face bruised and bloodied.