A court in the Pakistani city of Rawalpindi has sentenced a 70-year-old British man to death after convicting him of blasphemy.
Muhammad 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.
Asghar, who is from Edinburgh, 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.
"Asghar claimed to be a prophet even inside the court. He confessed it in front of the judge," Javed Gul, a government prosecutor, told AFP news agency.
But 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.
His lawyer says she will launch an appeal against the verdict, which was delivered late on Thursday. Higher courts in Pakistan have been known to overturn blasphemy verdicts handed down in lower courts because of insufficient evidence.
Asgharn has been diagnosed as a paranoid schizophrenic and had treatment at the Royal Victoria Hospital in Edinburgh, but the court did not accept his medical reports from the UK, reports say.
He has been in jail since his arrest in 2010 and his lawyer says he has also tried to take his own life in jail on one occasion.
Correspondents say Asghar is unlikely to be executed as Pakistan has had a de facto moratorium on the death penalty since 2008. He was also ordered to pay a substantial fine by the court.
A Scottish government spokesman said they were "concerned" about the case.
"As a minimum we would urge the Pakistani authorities to abide by the moratorium they have on the death penalty. Our thoughts are with Mr Asghar's family at this difficult time," the spokesman said.
Senior UK Foreign Office Minister Baroness Warsi said British officials were providing consular support to Mr Asghar.
"We will be raising our concerns in the strongest possible terms with the Pakistani government," she added.
The legal charity Reprieve has urged the UK government to take immediate steps to protect Asghar, adding that he has has "a long and documented history of psychological ill-health" and needs constant care.
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 Masih, 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.
Earlier this year, another 72-year-old British Pakistani from the Ahmadi community, Masood Ahmed, was jailed on blasphemy charges.