Islamabad, Pakistan - Pakistan has executed a man who rights groups say was tortured into confessing to a murder when he was still a minor, prison officials and his lawyers have confirmed.

Aftab Bahadur, 37, was convicted for the murder of a woman and her two children in September 1992, when he was 15, and had been on death row for almost 23 years.

He was hanged on Wednesday morning at the Kot Lakhpat jail in the eastern city of Lahore, prison officials told the AFP news agency.

The Justice Project Pakistan (JPP), a legal rights organisation representing Bahadur, and UK-based rights group Reprieve say that Bahadur was tortured by police into confessing to the murder, and that key witnesses in the case had recanted their testimony.

Ghulam Mustafa, a co-accused who also maintains his innocence and who rights groups say recanted his testimony against Bahadur, was not hanged as scheduled on Wednesday, after reportedly reaching a settlement with the victim's family.

RELATED: Confusion surrounds Pakistan's 'terrorist' executions

Maya Fou, director of Reprieve's death penalty team, said it "was a truly shameful day for Pakistan's justice system".

"Aftab was subjected to almost every injustice conceivable. Just 15 years old when he was arrested, tortured and sentenced to death, he spent 23 years languishing on death row for a crime he didn’t commit before being executed in the early hours of this morning," she said in a statement.

"To the last, Pakistan refused even to grant his lawyers the few days needed to present evidence which would have proved his innocence. This is a travesty of justice and tragedy for all those who knew Aftab."

On Tuesday, jail authorities defied a Lahore High Court order that allowed JPP access to Mustafa, the co-accused, in order to obtain a signed affidavit of him declaring Bahadur's innocence, JPP lawyers told Al Jazeera.

Earlier, Pakistani authorities granted a fourth last-minute stay of execution to Shafqat Hussain, due to be hanged on Tuesday, who rights groups also claim was a minor who was tortured into confessing to a murder in 2004.

'We die many times'

Speaking to Al Jazeera in February, Bahadur had said he felt it was "unjust" for him to have been imprisoned for such a duration.

"I have spent 23 years in jail and it is more painful than a life sentence. I feel this is unfair and unjust to keep us in such a situation that we are forced to bear dual punishment of a single crime," he said.

"During the last 23 years of my imprisonment, I have received death warrants so many times that I can't remember the exact number.

"Obviously, it feels horrible whenever the warrant had been issued. We start to count down [to our execution] which itself is painful and shackles our nerves," Bahadur told Al Jazeera at the time.

"In fact, we die many times before our death. In my personal experience, nothing is more dreadful that waiting to die."

Bahadur, who was a Christian, said that he and fellow non-Muslim inmates at Kot Lakhpat Jail faced threats from other prisoners based on their faith.

Pakistan lifted a moratorium on executions in December, following an attack on a school in Peshawar that killed more than 141 people, most of them schoolchildren. Initially, the moratorium was only lifted in "terrorism" cases, but in March, the government ordered the recommencement of all executions.

Since then, more than 130 people have been executed, mainly in cases related to murder.

Follow Asad Hashim on Twitter: @AsadHashim