A Christian man in Pakistan was sentenced to death on charges of blasphemy after he sent an alleged anti-Islamic poem to a Muslim friend on messaging service WhatsApp, AFP reported on Friday. The defendant’s lawyer Anjum Wakeel said the trial was held inside a prison as local clerics had threatened the accused and his family.

The accused, 35-year-old Nadeem James, was arrested in July 2016 after his friend accused him of sharing material that was derogatory towards Prophet Mohammad and other holy figures, Reuters reported.

“My client will appeal the sentence in the high court as he has been framed by his friend who was annoyed over his [James’] affair with a Muslim girl,” Wakeel told AFP.

Blasphemy is a criminal offence in Pakistan, and insults against Prophet Mohammad are punishable by death. In April 2017, a student of the Abdul Wali Khan university, Mashal Khan, was lynched by a mob over allegations of blasphemy. Eight people had been charged with murder and terrorism in the case.