A Christian man in Lahore has been sentenced to death for blasphemy after he sent a Muslim friend a poem on WhatsApp that insulted Islam, a lawyer said Friday.

The accused was charged in July last year after his friend, Yasir Bashir, complained to police that he received a poem on the messaging app that was derogatory toward the Prophet Mohammed (PBUH) and other holy figures.

The accused “was handed a death sentence by the court on Thursday on blasphemy charges,” defence lawyer Anjum Wakeel told AFP, alleging that his client was been framed by Bashir.

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

He said the trial was held inside a prison due to security reasons after local clerics had threatened the accused and his family.

Court officials confirmed the sentence.

Blasphemy has been a contentious issue in the country where people have been murdered over allegations of sacrilege. Earlier this year, a mob in Abdul Wali Khan University Mardan beat up a student, Mashal Khan, to death after accusing him of blasphemy over social media.

The incident caused an outrage across the country, with calls for the blasphemy law to be amended. The investigation into Mashal's murder was concluded after a joint investigation team probing the case cleared him of all blasphemy charges.

Pakistan is cracking down against blasphemy related crimes on social media with former interior minister Chaudhry Nisar threatening to block all social media websites with 'blasphemous content' earlier this year.