A Turkish journalist was handed down a suspended sentence of two years, five months in prison on Thursday for insulting Turkey’s president, Recep Tayyip Erdoğan, Reuters reported, citing a court ruling shown to them. 

Hüsnü Mahalli, a prominent journalist who also writes columns for the opposition Sozcu newspaper, will not be incarcerated due to time already served and as the ruling is up for appeal. 

The Turkish court also handed Mahalli a suspended sentence of one year, eight months for insulting public officials.

Mahalli will only serve the lesser sentence if he commits a crime that requires a prison sentence in the next five years, during which time he will be on probation. 

“My client has been sentenced due to the expressions he used in his columns, tweets. These should be regarded within freedom of criticism. We will appeal the sentence,” Mahalli’s lawyer Ertuğrul Aydoğan said.

Mahalli was detained in December 2016 after he accused Turkey of assisting terrorist groups in Syria and called Erdoğan a dictator. He was released in January 2017 pending trial. 

Mahalli defended himself in court, saying he was doing his job, the private Demirören news agency (DHA) reported. 

“I have not insulted the president. I have always addressed him as Mr. President. The word ‘dictator’ is not an insulting word. I request my acquittal,” he said during his defense, DHA said.