A court in the Pakistani city of Rawalpindi has sentenced a 65-year-old British man to death after convicting him of blasphemy.

Mohammad Asghar was arrested in 2010 after writing letters to various people claiming to be a prophet, reports say.

His lawyers argued for leniency saying he has a history of mental illness, but this was rejected by a medical panel.

Pakistan's controversial blasphemy laws carry a potential death sentence for anyone deemed to have insulted Islam.

Several recent cases have prompted international concern about the application of these laws.

Mr Asghar, who is believed to have family in Scotland, was accused of writing letters to police officers claiming to be a prophet. He is thought to have lived in Pakistan for several years.

His lawyer told the BBC's Saba Eitizaz that she was forcibly removed from the case by the judge and that proceedings were carried out behind closed doors.

She says she will launch an appeal against the verdict, which was delivered late on Thursday.

Correspondents say Mr Asghar is unlikely to be executed as Pakistan has had a moratorium on the death penalty since 2008.

Critics argue that Pakistan's blasphemy laws are frequently misused to settle personal scores and that members of minority groups are also unfairly targeted.

In 2012 the arrest of a young Christian girl, Rimsha, on blasphemy charges provoked international outrage. After being detained in a high security prison for several weeks she was eventually released and her family subsequently fled to Canada.

Blasphemy is a highly sensitive issue in Pakistan, where 97% of the population are Muslim.

Muslims constitute a majority of those prosecuted, followed by the minority Ahmadi community.