Among those shot to death were 27 foreigners including citizens from Lebanon and Saudi Arabia
The main suspect accused of killing 39 people at an Istanbul nightclub in a New Year's attack in 2017 denied all charges in court on Monday, Turkish state media reported.
The accused, Abdulkadir Masharipov, an Uzbek national, could face 40 life sentences if convicted, one for each of the victims and the massacre itself.
Masharipov told the Istanbul court during a closed hearing on Monday that he did not conduct the attack and he was "not the individual seen with a Kalashnikov in his hands", state news agency Anadolu reported.
The alleged gunman had previously refused to testify in court but on Monday said he rejected previous statements to police in which he accepted responsibility for the attack.
Among those shot to death were 27 foreigners including citizens from Lebanon, Saudi Arabia, Israel, Iraq and Morocco who had gone to the elite Reina nightclub to celebrate the new year.
ISIL claimed the shooting at the time after a string of terror attacks blamed on jihadists and Kurdish militants in 2015 and 2016.
The main suspect was caught after a long manhunt on January 17, 2017, in Istanbul's Esenyurt neighbourhood.
Masharipov on Monday said that he had come to Turkey via Pakistan and Iran because his wife was sick and he had no money, Anadolu said.
He told the court that a friend showed a picture of him on the internet the day after the attack, which shocked him, and he suggested the media was to blame for connecting him to the shooting.
He is one of 58 suspects on trial but late on Monday, the judge ordered the conditional release of 19 individuals for the duration of the legal proceedings.
But the court ruled that 20 suspects including Masharipov, his wife Zarina Nurullayeva and a French woman with whom he is religiously married but not legally, should remain in custody, the agency reported.
Anadolu did not give details on the other 19 suspects who are not in custody.
The next hearing in the case will be on May 16.