Abu Qatada has won his appeal against the Home Secretary Theresa May’s refusal to revoke the fresh deportation order she issued in his case this April, following assurances she’d received from the Jordanian government about his retrial, if and when he arrives there, on terrorist offences.

Here’s today’s judgment from the Special Immigration Appeals Commission.

It’s an interesting judgment, this: in essence SIAC has concluded, based on conflicting opinions from Jordanian legal experts, that there remains a real risk that “torture evidence” – that is, previous statements obtained allegedly by torture from other defendants in previous trials of Abu Qatada – will be relied on at his retrial there.

The risk arises because of a combination of two factors: first, Jordanian law may make the previous statement of a former co-defendant admissible as evidence, as well as live testimony from him (equally, it may not); and second, if the evidence is admissible, Jordanian law may only permit judges to exclude it if Abu Qatada can prove it was actually gained by torture (the Jordanian government says the prosecution would have to prove is was not gained by torture).

In these circumstances, since according to SIAC there is a real risk torture evidence will be used against him, deportation would lead to a flagrant denial of justice and so breach Abu Qatada’s article 6 right to a fair trial – as the European Court of Human Rights ruled in January. In short, therefore, SIAC has ruled that Theresa May did not, after all, obtain assurances from Jordan firm enough to change the underlying factual background, so making the European Court’s ruling inapplicable.

As has been widely reported, the government is seeking permission to appeal. In principle the right to appeal is only on a question of law, under section 7 of the Special Immigration Appeals Commission Act 1997. On the face of it causes a problem for Theresa May: the question whether there is a real risk or torture evidence being used is a question of fact, as is any issue of Jordanian law (since foreign law is a question of fact in English courts).

But I think there’s probably room for the government to frame an appeal in terms of law. One way of doing that familiar to most lawyers would be to argue that no reasonable Commission could have concluded there was a real risk here on the facts: this kind of factual irrationality is a question of law rather than of fact.

I’m not sure the government even needs to go there, though. In reality what’s at stake in this case is at what point a risk of torture evidence being used changes, because of legal assurances and guarantees, from being “real” to less than real. Here, the government could argue that rather than looking at the reality of the risk in the round, SIAC has in effect ruled deportation unlawful because there remains some risk torture evidence may be used; or else that it’s unjustifiably focused on the question of where the burden of proof lies, rather than on the likelihood of the evidence actually being admitted having been obtained by torture.

Either of these arguments can be framed in terms of SIAC’s misapplying the test laid down by the European Court. An appeal by the Home Secretary does seem to me a realistic option, therefore – and I’d be surprised if she doesn’t get permission, if not from SIAC itself, then in due course by the Court of Appeal.

Abu Qatada is on pretty strict bail now – but only pending any appeal. If the Home Secretary is ultimately refused permission to appeal by the Court of Appeal, then her deportation order will fall away – and there would be no legal basis for his further detention. Abu Qatada would then in principle be free, without any conditions. Does Theresa May have any further cards to play?

She does. For one thing, she could consider imposing a Terrorism Prevention and Investigation Measure on him – the new version of what used to be called “control orders” – under the Terrorism Prevention and Investigation Measures Act 2011. A “TPIM” could include restrictions at least roughly analogous to the conditions of Abu Qatada’s current bail.

More important, though, Theresa May can try to change the underlying facts here by obtaining further assurances and legal changes from the Jordanians, making clear that previous statements in case like this cannot be used in evidence unless the relevant witness is unavailable and if the prosecution can satisfy the court it was not obtained by torture or inhuman treatment. If Jordanian law can be changed to make that clear, the facts would again have been changed – and Theresa May could issue yet another deportation order. That would be to start yet again from square one – and the appeal merry-go-round would begin again.

Just as she did between January and April this year, therefore, I expect the Home Secretary to adopt a twin-track strategy, on the one hand trying to persuade the courts to adopt a legal approach which allows them effectively to approve the factual position she’s reached with Jordan; and on the other, to try to persuade Jordan to alter the facts yet further so as to fit the requirements of the courts.

This story isn’t going to end soon.