ISTANBUL: A Turkish comedian was rearrested Friday after a court ordered his release in a separate case in which he was accused of insulting Islam and President Recep Tayyip Erdogan, Turkish media reported.

Deniz Goktas, 32, whose stand-up performances have attracted millions of views online, was detained at Istanbul airport in July.

His arrest came amid a widening crackdown by Turkish authorities on critics of Erdogan’s government, with musicians, artists, journalists and politicians among those facing legal investigations.

A court on Friday ordered his release following an appeal against his July detention, the private NTV broadcaster reported.

But before the ruling could be implemented, prosecutors launched a separate investigation into Goktas, who is being held in the northwestern town of Corlu.

He was rearrested on charges of “praising a crime and a criminal” over remarks made during one of his performances, preventing his release from prison, according to NTV.

His lawyer could not immediately be reached for comment.