Relatives carry the coffin of Saulat Mirza, who was sentenced to death by an anti-terrorism court in 1999 for killing three people and hanged, after his body arrived in Karachi, Pakistan, in this May 12, 2015 file photo.Athar Hussain/Files

ISLAMABAD (Reuters) - When Pakistan resumed executions after the massacre of 134 pupils at an army-run school last December, the government promised hangings would help deter Islamist militants.

A Reuters analysis of 180 people hanged since late December, however, shows that fewer than one in six were linked to militancy.

Hangings are set to resume this week after a hiatus for the Muslim month of fasting, and the findings raise questions over whether Pakistan's capital punishment is having the desired effect.

Lawyers and rights groups say several cases that ended in execution had serious legal shortcomings, and although the campaign is broadly popular at home it has drawn condemnation from international partners.

Within six months, Pakistan has become the world's third-ranking country in terms of executions, behind China and Iran.

Of 180 people executed since January, 29 were convicted of assassinations or assassination attempts, sectarian murders, a hijacking or killing of security officials - falling under a broad definition of militancy.

Almost all were hanged immediately after the massacre. Since then, most executions were of murderers with no militant links.

Officials say the death penalty has deterred militant attacks.

"You've seen the number of terrorist attacks going down drastically," the prime minister's special assistant for law, Ashtar Ausaf Ali, told Reuters. "One of the reasons is fear. Fear of being executed."

LINK IN DOUBT

He did not provide figures, but the executions coincide with a steady fall in militant attacks since 2010, when the military began seizing territory from Taliban insurgents. A further crackdown launched a year ago was another factor.

There was no dramatic decline this year, however, suggesting the link to executions was "not major", said Muhammad Amir Rana, head of the Pakistan Institute for Peace Studies, which runs a database on militant attacks.

That showed 976 people died in the first six months of 2014, 747 in the second six months of 2014 and 612 in the first six months of 2015.

The Taliban and other militants scoffed at the idea that hanging might stop them.

"When we can blow up ourselves to hit targets and embrace martyrdom, how can hangings scare us?" one militant asked.

The interior ministry did not respond to requests for comment for this article.

One senior security official said the death penalty was designed to quench public thirst for vengeance after the school massacre, while at the same time leaving militant groups deemed useful untouched.

Some militants have historic links with Pakistan's powerful armed forces and intelligence, which used them as proxy forces against arch-rival India. Several banned groups still operate freely and hold public rallies.

"It was never meant for militants, and if it was, it was only for those few who were no longer dancing to our tune," said the official, who asked not to be named because of the sensitivity of the matter.

The military did not respond to requests for comment, but has denied operational links to militants.

Ali said many jailed militants had appeals pending, and they would be executed if the appeals failed.

About 100 cases have gone to secret military courts set up after the Peshawar attack and 27 judgments have been passed, Ali said. The case files are secret.

Pakistan's antiquated and overburdened justice system does not have public data on executions, the number of people on death row and the crimes for which they are being held.

Reuters analysed databases of news reports collated by legal aid group Reprieve and rights group Amnesty International. Not all the reports were verified.

"STAGGERING INCOMPETENCE"

European legislator Richard Howitt said the hangings were "a cause of great European concern" and could endanger a tax break for Pakistan linked to human rights.

The "GSP plus" status gives Pakistani manufacturers favourable access to European markets and generated more than a billion dollars in increased trade for Pakistan last year.

"I want to appeal to Pakistan to refrain from further executions which could indeed impinge renewal of trade preferences with the EU," he told Reuters. Human rights lawyer Saroop Ijaz has worked on dozens of death penalty appeals, and says an overwhelming number show "staggering incompetence" in the criminal justice system.

Police rarely gather evidence, he said, instead relying on witnesses who may be bribed or intimidated. Some defendants are tried in a language they do not speak, and some say they were tortured into confessing.

Poor defendants are represented by public defense lawyers, typically paid 10-14,000 rupees ($100-$140) a month. They often don't show up.

Naval officer Zulfiqar Ali Khan was hanged after being convicted of a double murder 16 years ago. His lawyers said he was defending himself during a robbery.

His court-appointed lawyer did not meet him once outside of court, present evidence in his defensse or properly challenge witness statements, said legal aid group Justice Project Pakistan.

"Poverty did not allow us to hire a private lawyer at any stage," said Khan's brother Abdul Qayyum, a low-paid clerk. "I cannot forget the moment I received the body of my brother... I will take the sense of loss and helplessness to my grave."

Additional reporting by Mubasher Bukhari in Lahore, Syed Raza Hassan in Karachi and Chiara Saldanha in New Delhi; Editing by Mike Collett-White