Pakistan has the unique ability to be a state so incompetent that it cannot fulfil even its most basic duties and yet manage to leave its citizens quaking in terror at how ruthless and tyrannical it can be.

This may seem like a contradiction but the latter quality necessarily flows from the former failing. A state that is so dysfunctional that it cannot succeed while following the rules invariably turns to the dark side, seeking convenient shortcuts that eschew morality and the law on the basis that the ends justify the means.

One single court case, ruled on last week, showed both aspects of the state – the bumbling and the conniving state. Qari Hashim, on trial for the murder of US journalist Daniel Pearl in 2002, was found not guilty by the courts and immediately released even though intelligence agencies believe it is he who introduced Pearl to his captors. This was the bumbling part, where the state was, as usual, unable to prove its case.

Next came the more sinister aspect when the government decided it had no reason to follow the directives of the court and simply picked up Hashim and decided to hold him without charge for another 90 days.

First the problem in securing convictions against suspected terrorists. Any hope of getting the guilty verdict is lost at the very beginning. Most of our tips and leads about militants come from the intelligence agencies, who are also involved in picking them up. Most are then held secretly but a few make it to court, likely to show the public that the government has rounded up suspects in connection with a particular crime.

But members of the agencies themselves do not want any scrutiny. They do not show up in court to testify or reveal any evidence. Even before the case has started it is already hamstrung.

Matters only get worse once the trial begins. Militants, it should go without saying, are not a cuddly bunch of peaceniks with respect for the procedures of law. Threats are made, and enough have been backed up by violence for judges to suddenly discover they cannot make it to court because they have to attend four weddings and a funeral on the trial dates.

The police vanish because they put their lives at risk on a daily basis anyway and aren’t about to add extra hazards to their routines. Witnesses were never there to begin with and why would they be when we have no proper witness protection programme to begin with? No prosecutor will dare try and pull a rabbit out of the hat after all these defections but they too have their safety to worry about.

The trial, as it did in the case of Hashim, ends with an acquittal. That’s when the agencies swoop back in and just take possession of the suspect. The logic behind this abduction is that we cannot find any proof against the guy but in our hearts we know he is a terrorist. Just as our court system undoubtedly lets many guilty people go free, the agencies end up capturing a lot of innocent people too.

What the agencies do used to be illegal. Now, thanks to the Protection of Pakistan Bill we have legalised illegality. Indefinite detention without charge is no longer a crime and even if the person who is picked up is found not to be guilty there is nothing that can be done about it if his captors claim they were acting in good faith.

We have found that the law doesn’t suit our aim of capturing militants – or to be more accurate, that we are too incompetent or scared to follow the law – and so have decided to spare ourselves such inconveniences as gathering evidence and making a case. So long as we get our man in the end, procedure can be discarded when necessary.

Of course, the problem hardly ends there. In the few cases where we have managed to obtain guilty verdicts legitimately, the militants have continued to thwart us even from prison.

Recall Ahmed Omar Sheikh, sentenced to death 12 years ago for killing Daniel Pearl. He became such a popular figure at Karachi Central Jail that he was given a run of the place with mobile phones at his disposal to coordinate attacks. He was even able to prank call the government posing as the Indian defence minister and nearly provoke a war, after which he was transferred to Hyderabad Central Jail.

And now we find out that Salmaan Taseer’s killer Mumtaz Qadri has brainwashed guards into doing his dirty work and trying to murder those jailed for blasphemy. This is a failure of the state on every level. We cannot follow the law for reasons of fear, risk of failure and ideological sympathies. Advantage: militants.