Islamabad: A Pakistani judge stayed the execution of a man whose lawyers say was 14 when he was charged with murder, a case that has angered rights groups and prompted mercy appeals from his family today.

Shafqat Hussain was due to be executed on Wednesday. His lawyers say he was 14 in 2004 when he was burnt with cigarettes and had fingernails removed until he confessed to the killing of a child.

It was the second stay of execution for Hussain.

In March, he was dressed in a white uniform ready for hanging and told to write his will before his execution was postponed while the Federal Investigation Agency looked into the question of his age.

The agency, Pakistan's equivalent of the U.S. FBI, later determined he was not a juvenile at the time of the killing and a new execution date was set. But that was also challenged.

"The judge has ruled that the FIA did not have the mandate to conduct the investigation into Shafqat's age and this should be done by a competent judicial forum," Shahab Siddiqui, of the Justice Project Pakistan, a legal aid group representing Hussain, told Reuters.

"So, until the matter is decided, his execution is stayed."

The death sentence cannot be imposed on a defendant who was under 18 at the time of the crime. Testimony obtained by torture is also inadmissible.

Prime Minister Nawaz Sharif lifted a moratorium on the death penalty on Dec. 17, a day after Pakistani Taliban gunmen attacked a school and killed 134 pupils and 19 adults.

Since then, 102 people have been executed, according to the Human Rights Commission of Pakistan.

Hussain's family has made heartrending appeals to the government, complaining of a flawed justice system that allowed months of torture to extract a confession.

Human rights groups say convictions in Pakistan are highly unreliable because its antiquated criminal justice system barely functions, torture is common and the police are mostly untrained.