ISTANBUL - A Turkish court convicted a writer of “insulting” President Recep Tayyip Erdogan in a book about last year’s mass anti-government protests, handing him a suspended jail sentence of almost one year, media reported Wednesday.

The Istanbul court in a closed hearing Tuesday sentenced Erol Ozkoray to 11 months and 20 days in prison, but suspended the term for five years, the reports said.

He was convicted of “publicly insulting a civil servant” and damaging “Erdogan’s dignity and honour in the eyes of the public,” Dogan news agency reported.

Graffiti, slogans and banners used in the book, “Phenomenon of Gezi”, also insult Erdogan, who was elected president last month after over a decade as prime minister.

In the book, co-written with his wife, Ozkoray wrote that the protests evolved into a “revolution” against the authoritarian tendencies of Erdogan’s Islamic-rooted government.

The protests began in June last year as a local movement to stop Istanbul’s Gezi Park from being razed but quickly blew up into wider nationwide demonstrations against Erdogan.

Eight people died and thousands were injured as police launched a brutal crackdown.

Several trials related to the protests are already taking place across the country, including of more than two dozen protesters accused of organising the demonstrations.

Activists have complained of an increasingly repressive atmosphere for media and writers in Turkey in the last years and Erdogan has repeatedly lashed out personally at journalists who displeased him.