Custodian of the Two Holy Mosques King Salman has sent a cable of condolences to Turkish President Recep Tayyip Erdogan following the armed attack in Istanbul which resulted in deaths of 39 people and dozens of injuries. The King said, "We have received with deep sorrow the news of the armed attack in Istanbul which resulted in deaths and injuries. "We strongly condemn this cowardly terrorist act and stress that the Kingdom of Saudi Arabia will stand with the Republic of Turkey and its people against anyone who tries to undermine its security and stability. "We, in my name and on behalf of the government and the people of the Kingdom of Saudi Arabia, offer our condolences to Your Excellency, the brotherly people of the Republic of Turkey and the families of the victims, and wish the injured a speedy recovery." Similar cables of condolences were sent by Crown Prince Muhammad Bin Naif, deputy premier and minister of interior, and Deputy Crown Prince Muhammad Bin Salman, second deputy premier and minister of defense. Five of the dead were from Saudi Arabia. The shooting at the Reina nightclub on the shores of Istanbul's Bosphorus waterway shook Turkey as it tries to recover from a failed July coup and a series of deadly bombings in cities including Istanbul and the capital Ankara. Some people jumped into the Bosphorus to save themselves after the attacker began shooting at random just over an hour into the new year. Witnesses described diving under tables as he walked around spraying bullets from an automatic rifle. Nationals of Saudi Arabia, Morocco, Lebanon, Libya, Israel, India, a Turkish-Belgian dual citizen and a Franco-Tunisian woman were among those killed, officials said. Arriving by taxi, the gunman produced a weapon, reportedly a Kalashnikov, and shot dead a policeman and civilian at the entrance. According to the Hurriyet daily, the gunman then fired off four magazines containing a total of 120 bullets around the club, as terrified guests flung themselves into the freezing waters of the Bosphorus in panic. But after changing clothes, the gunman left the nightclub in the ensuing chaos and has managed to evade security forces. Interior Minister Suleyman Soylu said Sunday that intense efforts were under way to find the gunman, and expressed hope that he would be captured soon. Turkish police, meanwhile, detained eight people in connection to the attack but were still hunting for the gunman who disappeared amid the chaos of the attack. Turkey's state-run Anadolu Agency said eight people were taken into custody by Istanbul anti-terrorism squads and they are being questioned at Istanbul's main police headquarters. It did not provide further information on the suspects. Late on Sunday, police rushed to Istanbul's Kurucesme district after a tip-off but the operation did not produce any arrest. "The danger continues," wrote columnist Abdulkadir Selvi in Hurriyet. "So long as this terrorist is not seized we do not know when and where a massacre could take place." Hurriyet said investigators believe the attacker may be from the Central Asian states of Kyrgyzstan or Uzbekistan. Investigators also consider it possible that the attacker is linked to the same cell that in June carried out a triple suicide bombing and gun attack at Istanbul's Ataturk airport that left 47 people dead, the paper added.