Pakistan has given its strongest indication yet that the mental condition of a Scots grandfather facing execution for blasphemy will be taken into account when his case goes before the country's appeal court.

International outcry followed the decision last month to sentence to death Mohammad Asghar, a diagnosed paranoid schizophrenic from Edinburgh, after he claimed in writing that he is a prophet.

The family of Mr Asghar face a lengthy appeal process and their legal team is arguing his well-documented history of mental illness had not been taken into account by the court that sentenced him.

Prime Minister David Cameron is among those who have condemned the court's decision and he has made a direct appeal to the Pakistan government over the case.

Human rights charity Reprieve has been campaigning for the 69-year-old former Edinburgh Royal Victoria Hospital patient.

Mr Asghar was diagnosed as paranoid schizophrenic after an observation period at the mental health unit in the capital and his doctor has written an affidavit outlining his disability.

He was arrested in Pakistan when he travelled there after his release about three years ago.

The comments from the High Commission are the strongest suggestion yet that records of his medical condition will be taken into account in a higher court after he was condemned to death last month.

However, the appeal process could take five years and his family said they feared he would die in jail.

A spokesman for the Pakistan High Commission would not say yesterday how long the case could take through the courts.

The senior aide at High Commission in London said: "The Pakistan High Commission wishes to inform all concerned the fact Mohammad Asghar was a mental illness case was perhaps not brought out in the proceedings of the case.

"Obviously in that state of mind his conduct in the court must have been responsible for the sentence.

"While the matter is being investigated, the Pakistan High Commission hopes in his appeal before higher appellate court, Mohammad Asghar's lawyers would be able to forcefully plead his case of mental condition on the basis of his previous history in UK.

"It is also hoped justice would be done on the grounds of his mental infirmity. The Pakistan High Commission would also like to bring it on record that the government of Pakistan has always stood for justice."

He added the "government of Pakistan believes in the policy as dictated by Islam that it is better to acquit 100 guilty to avoid punishment to one innocent person".

Mr Asghar's family made a public appeal for his release and a Foreign and Commonwealth Office spokesman said it had been in constant contact with the Pakistani authorities over the case.

He added: "The British Government remains opposed to the death penalty in all circumstances and we are dedicated to doing all we can to prevent the execution of any British national.

"We will continue to provide consular assistance to Mr Asghar and his family during this difficult time.

"We have continuously made representations to the Pakistan Government on behalf of Mr Asghar and will continue to do so."