A Christian man has been sentenced to death on blasphemy charges by a court in eastern Pakistan after a close friend accused him of sharing anti-Islamic material, the defendant's lawyer said.

Blasphemy is a criminal offence in Muslim-majority Pakistan, and insults against the Prophet Mohammad are punishable by death. Most cases are filed against members of minority communities.

Nadeem James, 35, was arrested in July 2016, accused by a friend of sharing material ridiculing the Prophet Mohammad on the WhatsApp messaging service.

Lawyer Riaz Anjum said his client intended to appeal against the verdict, passed on Thursday by a sessions court in the town of Gujrat.

READ MORE: In Pakistan, a shrine to murder for 'blasphemy'

There was widespread outrage across Pakistan last April when student Mashal Khan was beaten to death at his university in Mardan following a dormitory debate about religion.

Police arrested more than 20 students and some faculty members in connection with the killing.

Since then, parliament has considered adding safeguards to the blasphemy laws, a groundbreaking move given the emotive nature of the issue.

While not a single convict has ever been executed for blasphemy in Pakistan, there are currently about 40 people are on death row or serving life sentences for the crime, according to the United States Commission on International Religious Freedom.

Right-wing vigilantes and mobs have taken the law into their own hands, killing at least 69 people over alleged blasphemy since 1990, according to an Al Jazeera tally.

In March, Pakistan's ex-Prime Minister Nawaz Sharif ordered the immediate removal and blocking of all online content deemed to be "blasphemous" to Islam from social media - and for those responsible to be prosecuted.

WATCH: Tahir ul Qadri - 'No rule of law' in Pakistan (8:58)

In June, 30-year-old Taimoor Raza was sentenced to death for allegedly committed blasphemy on Facebook, a prosecutor said, in the first such case involving social media.

In May, a 10-year-old boy was killed and five others were wounded when a mob attacked a police station in an attempt to lynch a Hindu man charged with blasphemy for allegedly posting an incendiary image on social media.

And in 2011, a bodyguard assassinated Punjab provincial governor Salman Taseer after he called for the blasphemy laws to be reformed.