I’ve been following for some time David Miranda’s challenge to the lawfulness of his questioning at Heathrow airport in 2013. I wrote shortly after his detention; I covered his application for an injunction; I published his grounds for judicial review; I live-tweeted the judicial review hearing and analysed Lord Justice Laws’s judgment against Miranda; and last year, I published his grounds of appeal.

Having sat through some (not all) of the appeal hearing, I’m not surprised David Miranda has again seen his questioning ruled lawful, and compliant with his human rights. But I am very surprised by the Court of Appeal’s judgment today, in which it also declares incompatible with free expression the legislative power to stop and question Miranda, in Schedule 7 para. 2 of the Terrorism Act 2000. These two rulings, in the same judgment, seem to me mutually contradictory.

The surprise “incompatibility” ruling begins at paragraph 94, at the end of the judgment, and the Master of the Rolls Lord Dyson gets to the meat of his reasoning from paragraph 108 on. He says (para. 113)—

I accept that the fact that the powers must be exercised rationally, proportionately and in good faith provides a degree of protection. But the only safeguard against the powers not being so exercised is the possibility of judicial review proceedings. In my view, the possibility of such proceedings provides little protection … An important rationale for the principle of legal certainty that underpins the concept of “prescribed by law” is that there should be adequate safeguards against arbitrary decision-making … the possibility of judicial review proceedings to challenge the rationality, proportionality and good faith of a decision to interfere with freedom of expression in cases involving journalistic material cases does not afford an adequate safeguard.

And goes on at paras. 114 and 5 to conclude that—

prior judicial or other independent and impartial oversight (or immediate post factum oversight in urgent cases) is the natural and obvious adequate safeguard against the unlawful exercise of the Schedule 7 powers in cases involving journalistic freedom. For the reasons that I have given, the other safeguards relied on by Laws LJ provide inadequate protection.

[The Terrorism Act 2000], therefore, contains no adequate legal safeguards relating to journalistic material …

Lord Dyson’s ruling on this is perhaps a bit surprising given what he says earlier in his judgment about the realities of judicial scrutiny of police and security agency decisions in a case like this. At paragraph 79 he says

When determining the proportionality of a decision taken by the police in the interests of national security, the court should accord a substantial degree of deference to their expertise in assessing the risk to national security and in weighing it against countervailing interests. This is because the police have both the institutional competence and the constitutional responsibility to make such assessments and decisions.

He goes on a para. 82 to say

There is no reason to disagree with their assessment of the risk. Indeed, the court is ill equipped to do so. The police and the Security Service have the expertise and access to secret intelligence material which rightly make it very difficult to challenge such an assessment in a court of law.

If this is right, one wonders how much protection prior judicial authorisation would really offer a journalist. But there are bigger problems with the judgment than this, as we’ll see.

Lord Dyson’s reasoning is based on the requirement that any inference with free expression must be “prescribed by law”: in other words (to paraphrase the way Lord Hughes put it in the Supreme Court last year in Beghal, at para. 29 and 30) any law such as Schedule 7 must be accessible and its operation sufficiently foreseeable so that people subject to it can regulate their conduct; and it must contain sufficient safeguards to avoid its arbitrary exercise.

If there are not sufficient safeguards, then the power in question will breach freedom of expression even if it is used for a legitimate purpose and even if its use could be proportionate to that purpose. Again, as Lord Hughes put it in Beghal (para. 33) calling the requirement “legality”—

legality is a prior test which is designed to ensure that interference with Convention rights can be proportionate.

Legality is a logically prior requirement: only if a power is “prescribed by law” can its use be proportionate and so rights-compliant.

So far, so legally coherent. The problem is that, earlier on in his judgment, Lord Dyson held that stopping and questioning David Miranda was proportionate and rights-compliant, and for that reason lawful. At paragraph 84, agreeing with Laws LJ’s original judgment, he said—

the Schedule 7 stop was an interference with press freedom. But the compelling national security interests clearly outweighed Mr Miranda’s article 10 rights on the facts of this case. In reaching this conclusion, I also bear in mind the considerable deference that the court should accord to a decision to invoke the Schedule 7 power in a case of this kind. It follows that, subject to the point raised by the fourth ground of appeal, the decision to exercise the power was proportionate on the facts of this case.

So that there’s no mistake about his conclusion, Lord Dyson says at para. 118—

For the reasons that I have given, I would hold that the exercise of the Schedule 7 stop power in relation to Mr Miranda on 18 August 2013 was lawful … I would, therefore, dismiss the appeal in so far as it relates to the exercise of the stop power in this case.

Lord Dyson has of course made this ruling in the Court of Appeal, in judicial review proceedings brought by David Miranda after he was stopped. But, remember, as part of his reasoning on the “incompatibility” issue Lord Dyson also ruled (para. 113) that—

the possibility of judicial review proceedings to challenge the rationality, proportionality and good faith of a decision to interfere with freedom of expression in cases involving journalistic material cases does not afford an adequate safeguard.

If Lord Dyson is right that judicial review is inadequate, and cannot sufficiently protect journalistic material, then it cannot protect it in this case; Lord Dyson’s own ruling that questioning Miranda was lawful must be inadequate to satisfy human rights law. Without prior independent authorisation Miranda’s questioning can’t have been “prescribed by law”, and so must have breached the article 10 right to free expression. Lord Dyson could not possibly have “cured” that breach today.

The concept under the Human Rights Act 1998 that legislation may in itself be incompatible with a Convention right is a radical one: it means that the legislation necessarily and systematically causes breaches of human rights. Conversely, if not every use of a piece of legislation breaches human rights, then it is compatible with those rights. As Lady Hale put it in a very different context in 2005 in MH v. Health Secretary (para. 32)

the means exist of operating [the legislation] in a way which is compatible with the patient’s rights. It follows that the section itself cannot be incompatible, although the action or inaction of the authorities under it may be so.

The Human Rights Act forces judges to make a choice. Either a piece of legislation is in principle compatible with human rights, in which case its use in particular cases may still breach rights (and so be unlawful); or it’s incompatible with those rights in principle, in which case its use in every case will breach rights (and, in an apparent paradox, will therefore be lawful). You can’t have it both ways. You can’t hold the questioning of David Miranda compatible with human rights if you also think the legislation it was done under is not.

Lord Dyson might have ruled that Miranda’s questioning was lawful because the legislation is incompatible: an idea that seems counterintuitive but which follows necessarily from section 3(2)(b) and section 4(6) of the Human Rights Act. This (at first blush odd) rule is what preserves Parliament’s ability to make laws regardless of human rights. Had he done that, today’s appeal judgment would have made sense.

But that was not Lord Dyson’s approach. He held Miranda’s questioning lawful because proportionate and compatible with free expression. It’s a conclusion that’s unfortunately contradicted by the declaration of incompatibility in respect of the Terrorism Act itself.

How can this have been got so wrong? It’s worth noting that there’s little mention in the judgment of the Human Rights Act. I suspect the Court of Appeal has lost sight of the framework it lays down and has not gone through the necessary steps, before moving to a declaration, of considering whether it must strain the interpretation of Schedule 7 so as to render it rights-compatible. It may also be that focusing narowly on the grounds of appeal (the grounds relating to the detention emphasised proportionality while the ground relating to the legislation emphasised “legality”) has produced a “trees not wood” effect, the court failing to consider the legality (in the human rights “prescribed by law” sense) of the questioning in spite of its importance as regards the legislation.

However it’s happened, in my view this is a legally unsustainable ruling: it must surely be addressed and corrected by the Supreme Court. If David Miranda’s questioning complied with human rights, then so does the legislation it was done under; if on the other hand that legislation is incompatible with his rights, then so was his questioning.