A Turkish court has sentenced a teacher to almost a year in prison for making a rude gesture at President Tayyip Erdoğan at a political rally in 2014, according to local media reports.

Insulting a public official is a crime in Turkey, and Erdoğan, the country’s most popular but most divisive politician, is seen by his critics as intolerant of dissent and quick to take legal action over perceived slurs.

After a rally in the Aegean city of Izmir in 2014, when he was prime minister, Erdoğan lashed out at the woman and said she made a gesture at him that typified the rudeness of the main opposition Republican People’s party (CHP).

“Today as I was arriving (there was) a woman on a balcony,” he said. “She made such an ugly gesture with her hand. There you go, that is the CHP. I mean, the country’s prime minister is passing by and you make that gesture with your hand and arm.”

The teacher, who pleaded not guilty at the hearing, will serve 11 months and 20 days in jail, the Doğan news agency said.

Lawyers representing the president filed a lawsuit against the main opposition leader this week for calling Erdogan a dictator, presidential sources and the opposition party said.

Last week, Erdoğan urged prosecutors to investigate scores of academics for signing a declaration criticising military action in the mainly Kurdish south-east of the country.

On Friday Turkish security forces briefly detained 27 academics accused of terrorist propaganda. Erdoğan denounced the more than 1,000 signatories of the petition, who include US academic Noam Chomsky, as “dark, nefarious and brutal”.

Erdoğan, who has dominated Turkish politics for more than a decade, first as prime minister and since 2014 as its first popularly elected president, has previously sued several including cartoonists, teenagers and a former Miss Turkey winner.

