A Pakistani court has stayed the execution of a mentally ill man who was due to be hanged on January 17, according to his lawyers.

Khizar Hayat, a 55-year-old former police officer, was sentenced to death in 2003 for shooting a colleague.

The execution was temporarily stayed until January 30 by the Lahore High Court, The Justice Project Pakistan (JPP) group, which is managing his case, said on Thursday.

READ MORE: Pakistan sets execution date for mentally ill man

The judge, Shahid Hameed Dar, said it would be "unjust" to proceed on Hayat's case without waiting for the Supreme Court's decision regarding another mentally ill man, who was given a last-minute reprieve from execution by the High Court in October, the group said in a statement.

Last year, Pakistan's Supreme Court stayed the execution of Imdad Ali, a convict diagnosed with schizophrenia.

The United Nations has also previously called on Pakistan to protect mentally ill inmates, singling out Hayat as having "psychosocial disabilities".

"We are relieved to hear that Khizar has been granted a temporary reprieve," said JPP spokesman Waseem Waheed.

"However ... until the Supreme Court sets the standard for the way the law handles [mentally ill prisoners], we will continue to litter our death row with many Imdads and Khizars."

READ MORE: Concern over fate of missing Pakistani activists

A court-mandated medical board in July confirmed that Hayat suffers from a mental illness.

Hayat's mother, Iqbal Bano, also urged the country's president, Mamnoon Hussain, to pardon her son.

She said she visited her son in prison and that he "doesn't know what is going to happen to him, he is not in a stable state of mind"

"My son needs medical treatment, not execution," she told The Associated Press.

READ MORE: Tragedies that expose Pakistan's faultlines

Pakistan has hanged more than 400 convicts since a moratorium on executions was lifted in 2014.

Pakistan halted executions between 2008 and 2014 due to pressure from international human rights groups. But it lifted the moratorium following a Taliban attack on a school in Peshawar in December 2014 that killed 150 people, nearly all of them children.

Last year, the execution of a Pakistani man - who was allegedly arrested as a juvenile and tortured into confessing to a murder - triggered an international outcry.