ISTANBUL - Turkish Foreign Minister Mevlut Cavusoglu said Wednesday authorities have identified the gunman who killed 39 people in a New Year's attack at a nightclub in Istanbul.

Cavusoglu made the announcement during an interview with the state-run Anadolu news agency, but did not give the attacker's name.

Authorities have been searching for the shooter since early Sunday when he fled the Reina nightclub.

Turkish media broadcast video Tuesday of a man they said was the suspected gunman walking around Istanbul's Taksim square. It was unclear when the video was recorded. Authorities had earlier released a grainy image of the suspected shooter taken from security camera footage.

Anadolu also reported Wednesday authorities had detained five more people in connection with the attack. The five were suspected to be members of the Islamic State group and were taken into custody in the western city of Izmir.

U.S. President Barack Obama expressed his condolences Tuesday during a phone call with Turkish leader Recep Tayyip Erdogan. The White House said the two leaders agreed that Turkey and the United States must continue to stand united in order to defeat terrorism. Obama also praised Turkey’s ongoing efforts to work with regional players to facilitate a nationwide cease-fire in Syria and a return to political negotiations between the Syrian regime and the opposition.

Flowers are placed in front of a police barrier ne Flowers are placed in front of a police barrier near the entrance of Reina nightclub by the Bosphorus, which was attacked by a gunman, in Istanbul, Turkey, Jan. 1, 2017. Flowers are placed in front of a police barrier near the entrance of Reina nightclub by the Bosphorus, which was attacked by a gunman, in Istanbul, Turkey, Jan. 1, 2017.

The attack began early Sunday with the gunman killing a police officer and a civilian outside the nightclub before going inside. There were about 600 people, many of them foreigners, in the club at the time. In addition to those killed, about 70 people were injured.

In a statement Monday, Islamic State said one of its “heroic soldiers” carried out the attack and that it targeted Turkey for siding “with countries of the cross." The group said the night club was targeted because it was a place where “Christians celebrated their apostles.”

"It was certainly expected that Islamic State would one way or another be linked to the attack,” said political analyst Sinan Ulgen, of EDAM, an Istanbul-based political research group. "Looking at both the nature of the target, a popular night club, (and) the timing, New Year’s Eve, made it likely to be Islamic State.”

In a video released last week, Islamic State called on its supporters to launch attacks in Turkey. The video came against the backdrop of the Turkish military’s ongoing battle to wrest control of the strategically important Syrian town of al-Bab from the jihadist group.

Citing security sources, Turkish media reported Monday that the gunman in the nightclub attack is believed to have come from a Central Asian country, either Kyrgyzstan or Uzbekistan. Many Islamic State fighters are drawn from Central Asian countries and have used Istanbul as a base before traveling to fight in Syria.

Experts say Turkey is paying for the government’s earlier Syrian policy. “Turkey did choose to support Islamist-leaning groups of the Syrian rebel opposition, with the view and expectation that support would accelerate regime change in Syria,” notes analyst Ulgen. “What we have seen is these groups have taken advantage of the position of the Turkish government to set up (terror) cells within Turkey, which are now being used against Turkey.“

Local media, citing a police report, said that three days before the nightclub attack, 63 suspected Islamic State militants were detained across Turkey, including in Istanbul. The same report said many of those held were from foreign countries and that the same jihadist cell that carried out June’s attack on Ataturk airport could be behind this latest deadly attack.