ALEX Salmond has backed a bid by atheists to save a Scottish grandfather facing the death penalty for blasphemy in Pakistan.

The First Minister wrote in support of the Scottish Secular Society's campaign to free mentally ill Mohammad Asghar, from Edinburgh, who was convicted of the crime in the Islamic country last month after claiming he was the Prophet Mohammed, despite suffering from paranoid schizophrenia.

The society has gathered 30,000 signatures for the campaign for his release, and Mr Salmond's backing comes after Prime Minister David Cameron made a direct appeal to the Pakistan government to free the 68-year-old.

Mr Salmond said: "The Scottish Government opposes the use of the death penalty in all circumstances, and believes that such punishment has no place in the 21st century."

However, an appeal for clemency on medical grounds has been rejected by Pakistan, adding that Mr Asghar is receiving proper treatment and effectively telling the UK to stick to its own jurisdiction.

Caroline Lynch, chair of the Scottish Secular Society, launched the petition due to secularists' belief in "freedom of speech and faith". She said: "Mohammad Asghar has been convicted of blasphemy following a trial where his legal team were dismissed, and the state-nominated replacement presented no evidence in his defence. He should be helped, not killed.

"We ask that David Cameron and Alex Salmond intervene in the strongest possible terms, to help save the life of a vulnerable British man."

She added: "I started this petition because secularists believe in freedom of speech and faith. We feel that no-one should suffer persecution for their beliefs, and blasphemy is an affront to human rights.

"Mohammad Asghar must be freed, brought home to Edinburgh for medical treatment and to keep him safe."

A senior attache for the Pakistan High Commission in London hinted there was hope of an early court appeal - a process that can take up to five years - but rejected interrupting the legal process at the UK's behest.

He said: "As it is in the United Kingdom, that government cannot interfere in the judicial process [in Pakistan], the same is the case with Pakistan where courts decide cases as per law of the country.

"However, the following may be noted in case of Mohammad Asghar: he is being provided with the access to consular services; his lawyers have full access to him; and the concerned authorities have been directed to provide him with appropriate medical treatment and security.

"Since the matter is sub-judice, the Pakistan High Commission London is unable to further comment on the case."

Mr Asghar's family said his treatment had been restricted during his time in prison despite his history of illness that was supported by an affidavit from his doctor in Scotland.

He was sectioned in the UK after being diagnosed with paranoid schizophrenia and four months after his release, following a month under observation in the Royal Victoria Hospital in Edinburgh, he travelled to Pakistan.

Mr Asghar was arrested in 2010 in Rawalpindi, near the capital, Islamabad, where it is claimed his tenant accused him of blasphemy.

Earlier, through a statement released through the charity Reprieve, Mr Asghar's family had said: "By the time the trial concluded he had already been in horrific jail conditions."

Scottish human rights lawyer Aamer Anwar, Labour's shadow Justice Secretary Sadiq Khan and academics from the Muslim Institute and the Islamic Society of Britain are among those to have signed an open letter to Pakistan President Mamnoon Hussain and the Pakistani government appealing for clemency this week.