A social media user who was convicted on charges of insulting President Recep Tayyip Erdoğan in a photograph was subsequently acquitted after an appeals court ruled that Erdoğan was portrayed as a cock, which is superior in the pecking order to the hen, the Diken news website reported on Thursday.

Hasan Akkaya was sentenced to one year in prison by the Karşıyaka 1st Penal Court of First Instance in İzmir province for insulting President Erdoğan on social media with a photoshopped image in which Erdoğan was depicted as a rooster and Prime Minister Ahmet Davutoğlu as a hen. The court converted the sentence to a TL 6,000 fine.

Akkaya appealed the decision to the İzmir District Administrative Court. Sinan Alabay, the lawyer for Akkaya, told the court: “If there is an insult, it could be against Ahmet Davutoğlu, who was depicted as a hen kissing the foot of the cock. There is no insult against President Erdoğan in this image.”

Agreeing that the rooster is superior to the hen and that there is no insult of the president in the picture, the court decided to acquit Akkaya.

A court in the western province of Aydın on April 18 acquitted physician Bilgin Çiftçi, who faced charges of insulting President Erdoğan by pointing out similarities between Erdoğan and Gollum, a fictional character, in a Facebook post.

Çiftçi shared three facial expressions of Erdoğan and Gollum side by side on his Facebook page on Aug. 23, 2014, after which an investigation was immediately launched. Çiftçi lost his job as a public servant in October 2014.

Scores of people in Turkey have been detained or arrested or are under investigation on allegations of insulting Erdoğan.

As of the end of 2016, at least 10,000 people were under investigation on suspicion of terrorist propaganda and insulting senior state officials on social media.

According to figures released by the Ministry of Interior Affairs in December, 3,710 social media users had been investigated in the last six months of 2016, of whom 1,656 were arrested. A total of 1,203 of those investigations resulted in releases on probation.