A 22-year old Frenchman has been sentenced to three months in prison for texting his ex-girlfriend an emoji in the form of a pistol, in the first such ruling of its kind in France.

The court in Valence in the southern Drôme département ruled that the gun-shaped character at the end of a mobile phone text message constituted a “death threat in the form of an image”, and handed the accused a six-month sentence, with three suspended.

Bilal Azougagh, from Pierelatte admitted to having sent the message in the summer of 2015 to a girl who was a minor at the time.

The gun emoji, the term for a small digital image or icon used to express an idea or emotion in electronic communication, was among many text missives with which he flooded his unnamed ex-girlfriend after the pair split up.

In court, her lawyer reportedly argued that she “no longer dared come into to town and suffered from nightmares” since receiving the pistol emoji and due to his constant harassment.

The defence lawyer reportedly said that the court should not read too much into the pistol image, and cast doubt on the argument that this could have “such an impact” on the girl’s state of mind.