MULTAN, Pakistan (AP) – A Pakistani court on Saturday convicted a Muslim professor of blasphemy, sentencing him to death for allegedly spreading anti-Islamic ideas.

Junaid Hafeez has been held for six years awaiting trial. He’s spent most of that time in solitary confinement because he would likely be killed if kept with the general population, local media have reported. Due to security concerns, Saturday’s trial was held inside the jail where Hafeez is being held.

Defence attorney Shahbaz Gormani said his client was wrongly convicted and that the verdict would be appealed.

Pakistan´s controversial blasphemy law carries an automatic death penalty for anyone accused of insulting God, Islam, or religious figures.

While authorities have yet to carry out a death sentence for blasphemy, even the mere accusation can cause riots. Domestic and international human rights groups say blasphemy allegations have often been used to intimidate religious minorities and to settle personal scores.

A Punjab governor was killed by his own guard in 2011 after he defended a Christian woman, Aasia Bibi, who was accused of blasphemy.

Dhimmitude: Britain Turns Away Pakistani Christian to Appease ‘Sections of the Community’, Islamist Terrorists https://t.co/xtBjC8hiFT — Breitbart London (@BreitbartLondon) November 10, 2018

She was acquitted in January after spending eight years on death row in a case that drew international media attention. Faced with death threats from Islamic extremists upon her release, she flew to Canada to join her daughters in May.

Hafeez was arrested in 2013 for allegedly displaying blasphemous content while a visiting university lecturer in the city of Multan.

Prosecutor Athar Bukhari said Hafeez had spent three years in the United States under a special programme for Pakistani educators.

The prosecutor said investigators retrieved anti-religions material from Hafeez’s laptop after his arrest.

Hafeez was also fined half a million Pakistani rupees (over $3,200) on Saturday.

Pakistani Court Frees 20 People Suspected of Burning Christians Alive in Industrial Kiln for ‘Blasphemy’ https://t.co/swpC7II05u — Breitbart London (@BreitbartLondon) March 24, 2018