Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

ANKARA, Turkey — The mass shooting at an Istanbul nightclub on New Year's Eve was carried out professionally with the involvement of an intelligence organization, Turkish Deputy Prime Minister Numan Kurtulmus said on Monday.

"It appears the Reina attack is not just a terrorist organization's act, but there was also an intelligence organization involved," Kurtulmus said during an interview with broadcaster A Haber. "It was an extremely planned and organized act."

PHOTOS: Scenes of Chaos and Mourning After Istanbul Attack

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

A gunman killed 39 people at Istanbul's Reina nightclub, a swanky venue by the Bosporus where scores of people had gathered to celebrate the New Year.

The suspect opened fire with an automatic rifle, throwing stun grenades to allow himself to reload and shooting the wounded on the ground.

Turks and visitors from several Arab nations, India and Canada were among the victims.

ISIS has claimed responsibility for the attack, saying it was revenge for Turkish military involvement in Syria. The group said the rampage had been carried out "in response to a call" from its leader, Abu Bakr al-Baghdadi, although it didn't say whether it directed or merely inspired the perpetrator. They did not identify the attacker by name or provide proof he was acting on their behalf.

Related: Uneasy Peace Between ISIS, Turkey Descends Into 'Open War'

Earlier this month, Turkey's European Union affairs minister, Omer Celik, said the attack was carried out in an "extremely professional way" and that the assailant appeared to have received training "in the Middle East."

He said the attacker was using methods "that avoid all modern intelligence techniques" of tracking, including acting alone, not contacting anyone and "not using technology."

Anadolu news agency last week reported that a total of 35 people had been detained in relation to the attack.

Related: American Stayed Silent After Being Shot During Massacre