The suspect in a New Year’s Day nightclub bombing in Istanbul, which killed 39 people and wounded 65, said he is a member of Islamic State and asked to be given the death sentence, Turkish media reported Monday.

Citing testimony given in court Saturday, the reports quoted Abdulkadir Masharipov as saying that “it would be good if he was given capital punishment.”

A court in Istanbul charged Masharipov, an Uzbek national, with belonging to an armed terrorist group — Islamic State — possession of heavy weapons, attempting to destroy constitutional order, and murder.

Masharipov fled from the scene of the shootings but was arrested 17 days later in Istanbul after a nationwide manhunt. Authorities said he received terrorist training in Afghanistan and that he had confessed to the attack on the Reina nightclub in the early hours of January 1.

An injured woman is carried to an ambulance from a nightclub where a gun attack took place during a New Year's party in Istanbul, Turkey, Jan. 1, 2017.

Masharipov told the court he was a member of IS, Turkish media reported, but said he had not participated in any previous attacks. Masharipov told the court that his attack was religiously-motivated.

“I wanted to stage the attack on Christians in order to exact revenge on them for their acts committed all over the world,” he said. “My aim was to kill Christians.”

Saying he coordinated the attack by telephone with an IS leader in Syria he called Abu Jihad, Masharipov said the initial plan was to target a crowded outdoor venue on New Year’s Eve.

But “there were police officers everywhere,” he said. “I changed my mind. I called Abu Jihad and told him that I can’t carry out the attack there.”

The Syrian contact then sent him information about the fancy nightclub known as Reina.

A Turkish coast guard boat patrols in front of the Reina nightclub by the Bosphorus, which was attacked by a gunman, in Istanbul, Jan. 1, 2017.

“Abu Jihad sent me the address and photos of Reina,” the reports quoted him as saying. “I constantly texted him. I didn’t see him face-to-face. I went in front of Reina and there were no police officers or security … I don’t regret my actions. I entered Reina to die. I took revenge.”

The Turkish news site Diken reported on Sunday that Masharipov sent a video message to his family and urged his son to be a suicide bomber when he grows up. In the video, that includes his will, Masharipov also asked his children not to create problems for their mother.