An Istanbul court has convicted a popular comedian of insulting President Recep Tayyip Erdoğan – and handed down a sentence of nearly 19 months – but ordered his release due to time already served.

The court also imposed a travel ban, preventing the comedian from travelling outside Turkey, with the final appeal pending.

Deniz Göktaş, who denied the charges, had already spent almost 90 days in prison. Prosecutors had sought up to 12 years.

The case follows a wave of arrests that human‑rights groups say is aimed at crushing dissent.

Göktaş’s routine, which went viral on YouTube with over 15 million views, included a line calling Erdoğan a “shy dictator.” He insisted the comment was a political characterisation, not an insult.

He was arrested and handcuffed at Istanbul airport when he returned from holiday in July. Despite 88 days in solitary confinement, he maintained his humour during the court hearing.

"Three months have been taken away from my life," he said. "But I quit smoking, so I'll add another three months to my life," eliciting laughter and applause.

Supporters like fellow comedian Firat Aksal expressed surprise at the verdict. "We hardly know what to do with our happiness," Aksal said. "We are thrilled. To be honest we weren't hopeful of getting a fair trial."

Göktaş was released at 18:45 GMT and greeted by welcoming crowds, including his parents. After leaving the prison facility, he said he was happy to be reunited with family and friends, yet he noted the reality for thousands of others remains unchanged, stating, "I hope the day comes when we can all regain our freedom together."

Other detainees include journalists, human‑rights campaigners, student protesters, LGBTQ activists and Istanbul Mayor Ekrem Imamoglu. Turkey’s prisons are full.

Recep Tayyip Erdogan and his party deny that such arrests are politically motivated, insisting that Turkey’s judiciary is independent.

Additional reporting by Guncä Akpamuk.