Pakistan’s highest court has ruled that schizophrenia does not qualify as a “mental disorder” under the country's legal definition, paving the way for a mentally ill man’s execution.

The United Nations warned it would be against international law to hang Imdad Ali, who was sentenced to death over the murder of a religious scholar in 2002.

In 2012, the 50-year-old was diagnosed with paranoid schizophrenia and psychosis that doctors said impaired Mr Ali’s “rational thinking and decision-making capabilities”, and was declared clinically insane in a medical report the following year.

But he lost his final appeal last year and has since had his execution stayed by a last-minute appeal lodged by his wife at the Supreme Court.

On Thursday, judges ruled that the execution can go ahead, after finding that Mr Ali's schizophrenia is not a permanent condition and varies according to the “level of stress”.

Reprieve, a UK-based legal charity, said the court claimed that “it is, therefore, a recoverable disease, which, in all the cases, does not fall within the definition of ‘mental disorder’ as defined in the Mental Health Ordinance, 2001”.

The decision Mr Ali could be executed as early as 26 October, despite a medical assessment in September concluding his illness appeared to be “treatment resistant”.

Human rights attacks around the world Show all 10 1 /10 Human rights attacks around the world Human rights attacks around the world China Escalating crackdown against human rights activists including mass arrests of lawyers and a series of sweeping laws in the name of ‘national security’. Getty Images Human rights attacks around the world Egypt The arrest of thousands, including peaceful critics, in a ruthless crackdown in the name of national security, the prolonged detention of hundreds without charge or trial and the sentencing of hundreds of others to death. Getty Images Human rights attacks around the world Gambia Torture, enforced disappearances and the criminalisation of LGBTI people; and utter refusal to co-operate with the UN and regional human rights mechanisms on issues including freedom of expression, enforced disappearance and the death penalty. Getty Images Human rights attacks around the world Hungary Sealing off its borders to thousands of refugees in dire need; and obstructing collective regional attempts to help them. Getty Images Human rights attacks around the world Israel Maintaining its military blockade of Gaza and therefore collective punishment of the 1.8 million inhabitants there, as well as failing, like Palestine, to comply with a UN call to conduct credible investigations into war crimes committed during the 2014 Gaza conflict. Getty Images Human rights attacks around the world Kenya Extrajudicial executions, enforced disappearances and discrimination against refugees in its counter-terrorism operations; and attempts to undermine the International Criminal Court and its ability to pursue justice. Getty Images Human rights attacks around the world Pakistan The severe human rights failings of its response to the horrific Peshawar school massacre including its relentless use of the death penalty; and its policy on international NGOs giving authorities the power to monitor them and close them down if they are considered to be “against the interests” of the country. Getty Images Human rights attacks around the world Russia Repressive use of vague national security and anti-extremism legislation and its concerted attempts to silence civil society in the country; its shameful refusal to acknowledge civilian killings in Syria and its callous moves to block Security Council action on Syria. Getty Images Human rights attacks around the world Saudi Arabia Brutally cracking down on those who dared to advocate reform or criticise the authorities; and committing war crimes in the bombing campaign it has led in Yemen (pictured) while obstructing the establishment of a UN-led inquiry into violations by all sides in the conflict. Getty Images Human rights attacks around the world Syria Killing thousands of civilians in direct and indiscriminate attacks with barrel bombs and other weaponry and through acts of torture in detention; and enforcing lengthy sieges of civilian areas, blocking international aid from reaching starving civilians. Getty Images

Previously, the same court said a large proportion of prisoners in Pakistan suffer from mental illness and that authorities “cannot let everyone go”.

Maya Foa, a director of Reprieve, said: “It is outrageous for Pakistan’s Supreme Court to claim that schizophrenia is not a mental illness, and flies in the face of accepted medical knowledge, including Pakistan’s own mental health laws.

“It is terrifying to think that a mentally ill man like Imdad Ali could now hang because judges are pretending that schizophrenia is not a serious condition.

"Pakistan’s President needs to urgently intervene to stop this sickening attempt to hang Imdad.”

The UN’s human rights office has called on the government to halt Mr Ali’s execution and to launch a re-trial “in compliance with international standards”.

“It is a violation of death penalty safeguards to impose capital punishment on individuals with a psychosocial disability,” said a panel of experts from the Office for the High Commissioner of Human Rights (OHCHR).

“The courts have disregarded medical reports asserting that the defendant has a psychosocial disability and have not conducted an independent evaluation of his mental health status.

“Implementing the death penalty under these conditions is unlawful and tantamount to an arbitrary execution, as well as a form of cruel, inhuman or degrading punishment.”

The body said Mr Ali was referred for mental health treatment a year before the alleged murder but that the illness was not mentioned in the court ruling sentencing him to death.

In September, the first secretary of Pakistan’s permanent mission to the UN said the government was examining the country’s penal code to determine whether the death penalty could be “narrowed” amid criticism over Mr Ali’s case.

More than 400 people have been executed since the government lifted a four-year moratorium on the death penalty in 2014, following the Taliban’s massacre at a school in Peshawar.