The foreign minister did not name the attacker or give any further details.
"The identity of the person responsible for the Istanbul attack has been established," Mevlut Cavusoglu told Anadolu news agency during a televised interview.
He did not name the attacker or give any further details.
The assailant stormed the popular Reina nightclub on the Bosphorus and sprayed 120 bullets at terrified partygoers celebrating the start of 2017 on Sunday.
Of the 39 dead, 27 were foreigners including citizens from Lebanon, Saudi Arabia, Israel, Jordan, Iraq, Tunisia and Morocco.
The Islamic State group claimed the massacre on Monday, the first time it has produced such a claim for a mass attack in Turkey.
Since escaping from the club, the gunman has been on the run although authorities previously said they were seeking a suspected jihadist from Central Asia, reportedly from Kyrgyzstan or Uzbekistan.
According to Turkish media the attacker rented a flat in the central city of Konya before moving to Istanbul to carry out the attack.
There were also press reports suggesting he appeared to be well trained in the use of arms and had fought in Syria for IS.