Weeks after Taliban gunmen massacred 134 pupils at an army-run school, Pakistani lawmakers significantly expanded the power of military courts by allowing them to try civilians accused of terrorism.
Critics say the new rules cede too much ground to the military, which towers over Pakistani politics despite the first ever handover of power from one civilian government to another two years ago.
A Reuters investigation of legal documents provided by lawyers and families of those tried under existing military courts also highlights concerns over how fair and accountable the new courts will be.
Some convictions would have been thrown out by civilian courts, according to lawyers involved. Several defendants said they were denied access to legal representation in breach of military law. Some said they were tortured in custody.
The military can, and sometimes does, dissolve and reprimand courts that reach verdicts they disagree with, then order repeated retrials, according to court documents and former military officials.
"This happens often. The military is command-oriented, right from arrest until execution," said former military judge Inam ul-Rahiem.
He said he was forced into early retirement for delivering judgements the top brass disliked. He is now a defence lawyer in high-profile military cases.
The military declined to answer questions on the new courts or any of the cases cited in this article.
But some officers privately blame government incompetence for forcing the army's hand.
"With the civilian courts, it's justice delayed and justice denied," one senior military official said. "With the military courts, it's justice on time and justice delivered."
Senator Aitzaz Ahsan voted for the new courts, saying they were necessary in a country at "war" with militants.
"I have a visceral distaste for military courts, but the safeguards provided and the state of war we are in justifies it," he said.
Few dispute Pakistan's chaotic justice system moves at a glacial pace. Human rights lawyer Asma Jahangir says reforms are slow because the powerful don't want a judiciary that might one day hold them to account.
"It suits those who want to work the system," she said.
Amid popular pressure to crack down on militants in the wake of the Peshawar school atrocity in December, Prime Minister Nawaz Sharif championed the new courts in parliament and lifted a moratorium on the death penalty.
Those could include some of 6-7,000 people the military is holding in internment camps, the senior military official said. Many have been held for years, their identities and locations mostly secret.
They could face a trial like Ehsan Azeem's.
Military documents show Azeem was accused of attacking a military camp, yet he was sentenced for sedition.
When his parents were finally allowed to visit him in prison, Azeem told them he was tortured and had never appeared in court or spoken to a lawyer.
"He told me, 'I don't know on which charge we have been sentenced to death'," the prisoner's father, Muhammad Azeem, said, his weeping wife clutching a photo of their son.
"Our son has been abducted and punished like this? Why? It is justice?"