Case Nos: C4/2009/1324
C4/2010/2742
Neutral Citation Number: [2011] EWCA Civ 242
IN THE COURT OF APPEAL (CIVIL DIVISION)
ON APPEAL FROM THE HIGH COURT OF JUSTICE
QUEEN’S BENCH DIVISION
ADMINISTRATIVE COURT
MR JUSTICE DAVIS
[2009] EWHC 1324 (Admin) 
MR JUSTICE MITTING
[2010] EWHC 3083 (Admin)  
Royal Courts of Justice
Strand, London, WC2A 2LL

Date: 09/03/2011
Before :

LORD JUSTICE SEDLEY
LORD JUSTICE STANLEY BURNTON
and
LORD JUSTICE SULLIVAN
- - - - - - - - - - - - - - - - - - - - -
Between :

	 SECRETARY OF STATE FOR THE HOME DEPARTMENT	Appellant	
	- and -		
	 HASSAN ABDI 	Respondent

	AFRAH KHALAF	Appellant	
	- and –		
	SECRETARY OF STATE FOR THE HOME DEPARTMENT	Respondent	
- - - - - - - - - - - - - - - - - - - - -

(Transcript of the Handed Down Judgment of
WordWave International Limited
A Merrill Communications Company
190 Fleet Street, London EC4A 2AG
Tel No:  020 7404 1400, Fax No: 020 7831 8838
Official Shorthand Writers to the Court)
- - - - - - - - - - - - - - - - - - - - -

Mr Robin Tam QC and Mr Jeremy Johnson (instructed by Treasury Solicitor) for the Appellant in the case of Hassan Abdi
Mr Raza Husain QC and Ms Laura Dubinsky (instructed by Birnberg Peirce & Partners) for the Respondent in the case of Hassan Abdi
Mr Raza Husain QC and Mr Rory Dunlop (instructed by Duncan Lewis & Co) for the Appellant in the case of Afrah Khalaf
Mr Robin Tam QC and Ms Sarah Hannett  (instructed by Treasury Solicitor) for the Respondent in the case of Afrah Khalaf

Hearing dates: 8th to 10th February 2011  
- - - - - - - - - - - - - - - - - - - - -
Judgment
Lord Justice Sedley : 

All three members of the court have contributed to the judgment which follows.

The issue
1.	These conjoined appeals pose a question which is as difficult to answer as it is easy to state: in deciding whether a foreign national facing deportation has been detained for too long, does time which he has spent appealing against deportation count? If it does, then sufficiently protracted legal proceedings will sooner or later secure his release however weak his case and however strong the reasons for detaining him. If it does not, then a detainee with a sound legal challenge to removal or deportation may be penalised for asserting his rights by years of incarceration. So the question inexorably raises another question: is there a middle way?
The law
2.	The deportation of foreign nationals is authorised by s.3 of the Immigration Act 1971. Detention by the Home Secretary pending deportation or release is authorised by Sch. 3 to the Immigration Act 1971, §2. This provides, as amended:
Detention or control pending deportation
2 (1) Where a recommendation for deportation made by a court is in force in respect of any person, and that person is not detained in pursuance of the sentence or order of any court, he shall, unless the court by which the recommendation is made otherwise directs or a direction is given under sub-paragraph (1A) below, be detained pending the making of a deportation order in pursuance of the recommendation, unless the Secretary of State directs him to be released pending further consideration of his case or he is released on bail.
(1A)Where—
(a) a recommendation for deportation made by a court on conviction of a person is in force in respect of him; and
(b) he appeals against his conviction or against that recommendation,
the powers that the court determining the appeal may exercise include power to direct him to be released without setting aside the recommendation. 
(2) Where notice has been given to a person in accordance with regulations under section 105 of the Nationality, Immigration and Asylum Act 2002 (notice of decision)  of a decision to make a deportation order against him, and he is not detained in pursuance of the sentence or order of a court , he may be detained under the authority of the Secretary of State pending the making of the deportation order.
(3) Where a deportation order is in force against any person, he may be detained under the authority of the Secretary of State pending his removal or departure from the United Kingdom (and if already detained by virtue of sub-paragraph (1) or (2) above when the order is made, shall continue to be detained unless he is released on bail or the Secretary of State directs otherwise).

3.	The United Kingdom Borders Act 2007, with effect from 1 August 2008, builds on these powers. By s.32(5) the Home Secretary “must make a deportation order” against a foreign criminal (that is, a foreign national who has been sentenced on conviction to 12 months or more in prison), unless one of the exceptions set out in s.33 applies. These include cases where removal would breach the individual’s Convention rights or other treaty rights. S.33(7)(a) makes it clear that it is only removal pursuant to the deportation order which is excluded in such cases.
4.	These provisions contain no overt limit on the duration of detention pending deportation or release. Going by the statute alone, detention may be brought to an end only by the cessation of a condition precedent to detention (for example rescission of the deportation order), by executive decision, by the grant of bail or, of course, by physical removal.
5.	It is the courts as the guardians of personal liberty which have read into the legislation a limit on the permissible duration of detention under Sch.3. The classic decision of Woolf J (as he then was) in R v Governor of Durham Prison ex parte Hardial Singh [1984] 1 WLR 704 established that it could lawfully last for no longer than was reasonably needed in order to complete the process of deportation.
6.	The principle was explained more fully by Dyson LJ (as he then was) in R (I) v Home Secretary [2002] EWCA Civ 888, §46:
There is no dispute as to the principles that fall to be applied in the present case. They were stated by Woolf J in Re Hardial Singh [1984] 1 WLR 704, 706D in the passage quoted by Simon Brown LJ at paragraph 9 above. This statement was approved by Lord Browne-Wilkinson in Tan Te Lam v Tai A Chau Detention Centre [1997] AC 97, 111A-D in the passage quoted by Simon Brown LJ at paragraph 12 above. In my judgment, Mr Robb correctly submitted that the following four principles emerge: 
i) The Secretary of State must intend to deport the person and can only use the power to detain for that purpose;
ii) The deportee may only be detained for a period that is reasonable in all the circumstances;
iii) If, before the expiry of the reasonable period, it becomes apparent that the Secretary of State will not be able to effect deportation within that reasonable period, he should not seek to exercise the power of detention;
iv) The Secretary of State should act with the reasonable diligence and expedition to effect removal.

7.	It has to be borne in mind that neither Woolf J nor Dyson LJ was construing the wording of the statute in any conventional sense. Each judge was setting out what the justice of the common law implies into it, using such open-ended concepts as “a reasonable period” and “all the circumstances”. These describe, without attempting to define, a large area of judgment to be made in each case that comes before the court. The phrase “in all the circumstances” reminds courts that they must have regard to everything legally relevant, but to no more. It does not tell them whether, much less to what extent, time spent appealing forms part of the relevant circumstances; nor does it tell them what weight is to be given to those circumstances which are relevant.
8.	Thus Dyson LJ in I went on at § 48 to say this:
It is not possible or desirable to produce an exhaustive list of all the circumstances that are or may be relevant to the question of how long it is reasonable for the Secretary of State to detain a person pending deportation pursuant to paragraph 2(3) of schedule 3 to the Immigration Act 1971. But in my view they include at least: the length of the period of detention; the nature of the obstacles which stand in the path of the Secretary of State preventing a deportation; the diligence, speed and effectiveness of the steps taken by the Secretary of State to surmount such obstacles; the conditions in which the detained person is being kept; the effect of detention on him and his family; the risk that if he is released from detention he will abscond; and the danger that, if released, he will commit criminal offences.

9.	Here too the jurisprudence at present runs out: the obstacles to deportation in cases like the present ones without doubt include the pursuit of statutory appeals; the question is whether, or when, the time taken by them is to count for or against the detainee.
The present state of affairs
10.	We sat on 8, 9 and 10 February 2011 to hear these two appeals, the first of which, albeit contingently, raises issues beyond the one so far described. At that point of time the Supreme Court had heard argument but had not given judgment in R (WL (Congo) and KM (Jamaica)) v Home Secretary, an appeal against a decision of this court (Lord Neuberger MR, Carnwath and Stanley Burnton LJJ) [2010] EWCA Civ 111.
11.	The case of WL (Congo) was one of a group of five decided by Davis J in the Administrative Court in December 2008: see [2008] EWHC 3166 (Admin). Another of the five was the case of the present appellant Mr Abdi. Davis J held that an unpublished policy which the Home Office was operating created an unlawful presumption in favour of detaining candidates for deportation, but dismissed the claims on the ground that there were independent reasons in each case for detention. That decision was appealed by WL and KM to this court, together with the appeal of WL against a related decision of Collins J, [2008] EWHC 2090 (Admin). In February 2010, by a judgment of the court delivered by Stanley Burnton LJ, the appeals were dismissed and the Home Secretary’s cross-appeals in part allowed. The court’s essential reasons, based partly on fresh evidence, were that, while a presumption in favour of detention would not be unlawful, there had been an undisclosed blanket policy of detention which conflicted unlawfully with the published policy; but that, as Davis J had found, there were valid reasons independent of the policy for detention in each case.
12.	It is in relation to that decision that the pending judgment of the Supreme Court is awaited. It follows, in relation to the principal issue outlined above, that the last word so far is what was said by this court at §102:
In our judgment, the fact that a FNP is refusing to return voluntarily, or is refusing to cooperate in his return (for example, by refusing to apply for an emergency travel document, as initially did WL) is relevant to the assessment of the legality of his continued detention: see R (A) v Secretary of State for the Home Department cited below. So is the fact that the period of his detention has been increased, and his deportation postponed, by his pursuit of appeals and judicial review proceedings seeking to challenge his deportation order or his application for asylum or leave to remain, particularly if his applications and appeals are obviously unmeritorious. In our judgment, as a matter of principle, a FNP cannot complain of the prolongation of his detention if it is caused by his own conduct.

13.	We have considered with some anxiety whether we ought to await the Supreme Court’s decision and then reconvene. But although Mr Abdi has been released by order of Davis J and Mr Khalaf is now on bail, it seems to us our duty to deal without avoidable delay with any issue potentially affecting personal liberty. This is especially so in the light of the calamitous history of the present appeals, which were postponed just after Easter 2010 because the Icelandic eruption had trapped both Mr Abdi’s counsel outside the jurisdiction; were begun in July 2010 before Pill and Rimer LJJ and Peter Smith J with a time allocation of one and a half days; but were abandoned in the course of the second day because it was apparent to the court that the time allocated would be insufficient. Hence the restoration of the appeals before us with a joint 4-day allocation. 
14.	Two other things prompt us to go on. One is that the very subject-matter of the appeals is the effect of prolonging detention by litigation. The other is that it is by no means certain that the Supreme Court when deciding WL and KM will find it necessary or appropriate to deal directly with the main issue confronting us, any more than this court itself did.
The Abdi case 
15.	Mr Abdi is a Somali national, born in the northern province of Somaliland in January 1980. His mother has been lawfully present here as a refugee since 1989. Two years later, at the age of 11, Mr Abdi joined her. He was initially granted exceptional leave, and subsequently indefinite leave, to remain. From the age of 14, however, he became involved in repeated offending. There is no issue that by 30 November 2006, when the custodial element of his most recent sentence was about to expire, he was liable to deportation. He was accordingly transferred in January 2007 to an immigration removal centre.
16.	His appeal against the notice of intention to deport which had been served on him on 29 November 2006 was successful. It was held by an immigration judge on 13 March 2007 to be invalid by reason of errors on its face. Meanwhile, however, on 10 January 2007 a fresh deportation notice was served on him. This he failed to impugn on appeal, but he secured an order by way of statutory review for reconsideration. At a hearing on 12 May 2008 the Home Office conceded a material error of law and the AIT directed full reconsideration. The hearing set for 27 August 2008 was twice adjourned and did not take place until 12 December 2008. On 30 March 2009 the appeal was again dismissed, but an application for permission to appeal to this court was stayed behind the Supreme Court’s judgment in MS (Palestinian Territories) and was eventually conceded by the Home Office. The appeal has in consequence been remitted to the Upper Tribunal, where it remains pending.
17.	Although it is far from complete in its detail, two things are sufficiently established by this history. One is that pretty much the entirety of Mr Abdi’s detention up to March 2009 (only two months before his case came before Davis J) was taken up with his statutory appeals and related proceedings. In the course of them he applied for both bail and interim relief, but each was refused. The second is that none of his challenges or applications can fairly be characterised as merely obstructive: all were found to have enough substance to merit full judicial consideration, and some have succeeded. More than 4 years after he was first detained, the outcome of his challenges is still uncertain.
18.	Davis J, having held that there is no inflexible rule excluding all time spent on legal proceedings from the computation of time in detention, concluded his judgment thus:
79. In conclusion therefore, I find on the evidence that thus far Mr Abdi has not been unlawfully detained so as to entitle him to damages. But in all the circumstances he should now be released, as I conclude, on the application of Hardial Singh principles. Clearly I would impose conditions as to the terms of his release, and I will hear counsel on that. Mr Abdi will understand that if he reoffends, or otherwise breaches the terms of the conditions, he will not be saved from prospective further detention.

The Khalaf case
19.	Mr Khalaf too is a Somali national, born in October 1967. In January 1995 he reached the United Kingdom and claimed asylum. This was refused, but following successive periods of exceptional leave to remain, in May 2002 he was granted indefinite leave. By then he had a daughter, born in January 1998, who, like her mother (from whom he is estranged but not on bad terms) is a British national.
20.	Mr Khalaf has a single, but serious, conviction: in November 2007 he was convicted on two counts of conspiracy to supply cocaine and heroin and sentenced to 5½ years’ imprisonment. Ironically, he applied shortly after the start of his sentence for a place on the facilitated return scheme, but his application was rejected. On 13 August 2009 he was given notice of his liability to automatic deportation but made no representations as to why he should not be deported. On completion of his custodial sentence on 6 September 2009 he was detained under the Borders Act, and on 29 September he was served with a deportation order signed three days earlier. He gave notice of appeal against this order on 5 November.
21.	Interviewed as part of the emergency travel document procedure, he declined to co-operate until his appeal and the asylum claim he had now made had been concluded. On 19 February 2010 the asylum claim was refused and certified by the Home Secretary. On 22 February the First-Tier Tribunal dismissed the appeal. On 21 May removal directions were served. These were met within days with a judicial review application and a Rule 39 application to the European Court of Human Rights. Things then began to move Mr Khalaf’s way. The Rule 39 application was granted in Strasbourg; permission was granted to appeal to the Upper Tribunal; and the Home Secretary accepted that the judicial review application was fit for the grant of permission but sought a stay pending the decision of another case on unlawful detention and the determination of the Upper Tribunal in Mr Khalaf’s own appeal.
22.	By direction of Nicola Davies J, on 17 November 2010 the unlawful detention element of Mr Khalaf’s judicial review proceedings came before Mitting J who, in an ex tempore judgment [2010] EWHC 3083 (Admin), dismissed it. Mitting J granted permission to appeal, and on 9 December 2010 Mr Khalaf’s renewed application for bail succeeded.
23.	Mitting J, having rejected the submission that time spent appealing or otherwise challenging removal was a factor in the Hardial Singh exercise rather than simply time to be discounted, concluded:
32. Applying those principles to the facts of this case, it is clear that the claimant's appeals and application to the Strasbourg Court are going effectively to be determined by some time in early 2011.  By that time he will have been detained, even on a pessimistic view, for significantly less than two years, a period which, even after appeal rights have been exhausted, has been held not to be unreasonable in a string of domestic cases.

These appeals
24.	 In the Abdi case the appellant is the Home Secretary, who appeals against the failure of Davis J to leave out of account all time spent on appeals by Mr Abdi while in detention. This was Davis J’s conclusion on this aspect of the case:
76. Given all these circumstances, I think that the time has come in this particular case to say that enough is enough here. The relevant legal proceedings are likely to go on for a long time, so far as concerns Mr Abdi, potentially even running into years. It is time now, in my view, that Mr Abdi be released from detention and I so order. Rejecting, as I do, Mr Tam's argument that the court should ignore any period of time, whether in the past or hereafter to be spent in detention, whilst Mr Abdi is pursuing his appeal and any other related litigation, I do not think that it can now be said that Mr Abdi will be or is likely to be removed within a reasonable time; and I think that by now a reasonable period of time for detaining him has elapsed.
25.	In the Khalaf case the appellant is Mr Khalaf, who contends that Mitting J erred in concluding:
28. I am unconvinced that, save in exceptional circumstances where in truth no final point can be put upon the litigation, the fact that the claimant is detained while he pursues his remedies by way of appeal or application is simply a factor to be taken into account rather than a factor which is to be discounted in assessing the period, for the purpose of Hardial Singh principles for which it is reasonable for him to be detained.
26.	In addition, Mr Abdi advances these contentions by way of cross-appeal:
(i)	There being no realistic prospect of removal within a reasonable time, the power of detention had in any event lapsed before the hearing.
(ii)	Detention had in any event by then exceeded a reasonable time.
(iii)	If, which is contested, anything more is required than reliance on the unlawful policy nothing less than inevitability of continued detention will suffice.
27.	It has been agreed that we should not address the third of these issues because it is anticipated that the Supreme Court will shortly be doing so in WL and KM. For reasons to which we now turn, the first two issues are closely bound up with the Home Secretary’s appeal in the Abdi case, and we shall deal with them together.
To count or to discount?
28.	The Home Secretary’s case as formulated by Mr Tam is that, in assessing whether detention has lasted longer than is reasonably necessary for the purpose of deportation, and/or whether deportation is possible within a reasonable period, the time taken to resolve the detainee’s statutory appeal or  appeals against deportation should be left out of account, save to the extent that the delay has been caused by the Home Office or removal has been impossible for reasons unrelated to the detainee’s appeals. Such an exclusionary rule goes further than any decided case, but Mr Tam submits that it is justified on recognised principles.
29.	In particular it is Mr Tam’s case that the detainee has a choice as to whether to appeal or not. If, in order to remain in the United Kingdom, he exercises the right of appeal or other judicial challenge, he cannot complain if it prolongs his stay in detention. Secondly, if a detainee can secure release by prolonged appeals in order then to go to ground or resume his criminal activities, Hardial Singh would become an instrument of abuse. Thirdly, it is not helpful or appropriate for the courts to have to anticipate or evaluate what is exclusively a matter for the tribunals. Lastly, Mr Tam submits, it is inimical to legal certainty to make the legality of detention depend on unforeseeable and ill-defined circumstances rather than on identifiable official delays or practical impediments to return.
30.	Mr Husain founds upon the converse principle that everything capable of having a rational bearing comes into account when the court has to consider what is “reasonable in all the circumstances”. This, he submits, includes not only the fact that a known proportion of the time spent in detention has been taken up with appeals and related legal challenges but the outcomes and prospective outcomes of such proceedings, which may range from proven merits to time-wasting. 
31.	Neither counsel was prepared to adopt the middle way taken by Davis J and put to them again by us: to recognise that the time spent on legal challenges may have a causative relevance to the passage of time and hence to the question whether it has been excessive, without making it a rule that it is to be either counted or discounted. Mr Husain was willing in principle to move in this direction, but he found himself resorting more than once to an approach which was not compatible with it.
32.	The guideline principles in Hardial Singh and I have been set out earlier in this judgment. It is common ground, however, that they do not formally or even persuasively answer the question before us.
33.	Nor, as is again agreed, do any of the more recent decisions also cited by counsel answer the question, though each side seeks to derive support or comfort from them. They are considered with care in the judgments below, allowing us to start from the account of them set out by Davis J at §22-39. 
34.	Mr Tam’s baseline is the judgment of the European Court of Human Rights in Chahal v United Kingdom (1997) 23 EHRR 413. He does not suggest that, even if it were domestic authority, it would provide a binding answer, but he adopts it as strongly persuasive. Mr Chahal had been detained with a view to deportation since August 1990. The court said this:
112. The Court recalls that it is not in dispute that Mr Chahal has been detained "with a view to deportation" within the meaning of Article 5(1)(f).  (Art. 5(1)(f)) does not demand that the detention of a person against whom action is being taken with a view to deportation be reasonably considered necessary, for example to prevent his committing an offence or fleeing; in this respect Article 5 (1)(f) provides a different level of protection from Article 5 (1)(c).
Indeed, all that is required under this provision is that "action is being taken with a view to deportation".  It is therefore immaterial, for the purposes of Article 5(1)(f) whether the underlying decision to expel can be justified under national or Convention law.
113. The Court recalls, however, that any deprivation of liberty under Article 5(1)(f), will be justified only for as long as deportation proceedings are in progress.  If such proceedings are not prosecuted with due diligence, the detention will cease to be permissible under Article 5(1)(f).
It is thus necessary to determine whether the duration of the deportation proceedings was excessive.
114. The period under consideration commenced on 16 August 1990, when Mr Chahal was first detained with a view to deportation.  It terminated on 3 March 1994, when the domestic proceedings came to an end with the refusal of the House of Lords to allow leave to appeal   Although he has remained in custody until the present day, this latter period must be distinguished because during this time the Government have refrained from deporting him in compliance with the request made by the Commission under Rule 36 of its Rules of Procedure.
115. The Court has had regard to the length of time taken for the various decisions in the domestic proceedings.
As regards the decisions taken by the Secretary of State to refuse asylum, it does not consider that the periods were excessive, bearing in mind the detailed and careful consideration required for the applicant's request for political asylum and the opportunities afforded to the latter to make representations and submit information.
116. In connection with the judicial review proceedings before the national courts, it is noted that Mr Chahal's first application was made on 9 August 1991 and that a decision was reached on it by Mr Justice Popplewell on 2 December 1991.  He made a second application on 16 July 1992, which was heard between 18 and 21 December 1992, judgment being given on 12 February 1993.  The Court of Appeal dismissed the appeal against this decision on 22 October 1993 and refused him leave to appeal to the House of Lords.  The House of Lords similarly refused leave to appeal on 3 March 1994.
117. As the Court has observed in the context of Article 3 (art. 3), Mr Chahal's case involves considerations of an extremely serious and weighty nature.  It is neither in the interests of the individual applicant nor in the general public interest in the administration of justice that such decisions be taken hastily, without due regard to all the relevant issues and evidence

35.	This reasoning is equivocal in relation to the issue before us. On the one hand the court quite clearly did not disregard the time spent on appeals:  §115 expressly says so. Nor, however, did it ask whether the time spent on them was, without more, excessive. It appears to have confined itself to the question whether the proceedings themselves had taken longer than necessary: since they had not, art. 5(1)(f) had not been violated. For reasons which are plain enough, neither side has urged this approach on us in these appeals.
36.	From here, however, Mr Tam turns to the judgment of Simon Brown LJ, as he then was, in I :
33. Is it relevant to the question posed in this case that ever since 9 April 2001 (ie from just two months after the period of administrative detention began) the appellant has been pursuing a claim for asylum which would in any event have prevented his being returned to Afghanistan? This, to my mind, is the critical issue in the case. 
34. That a prolonged period of detention pending the final resolution of an asylum claim is sometimes permissible cannot be doubted: Chahal -v- United Kingdom (1996) 23 EHRR 413 illustrates the point well. The applicant was a Sikh separatist leader detained in custody for the purpose of deportation for some 3½ years (until the House of Lords’ final refusal of leave to appeal). The reason for his long detention pending removal, however, was because the Secretary of State regarded him as a threat to national security; but for his asylum claim there would have been no difficulty in returning him; on the contrary, the Indian government were anxious to secure his return. 
35. What Chahal illustrates is that a detained asylum seeker cannot invoke the delay necessarily occasioned by his own asylum claim (and any subsequent appeal(s)) to contend that his removal is clearly “not going to be possible within a reasonable time”, so that he must be released. That, however, is by no means to say that where, as here, a detainee, whom for reasons quite other than his asylum claim the Secretary of State is unable to remove, chooses during his detention to claim asylum, that claim, whilst unresolved, precludes his asserting that limitation 2 of the Hardial Singh principles is not satisfied. Nor, indeed, did Mr Robb for the Secretary of State put it that high. On the contrary, he made little of the point and suggested no more than that this appellant’s asylum claim is a factor in the case. 
36. What, then, should the approach be? For my part I found the following illustration (suggested by Mr Nicol) a useful one. Prior to September 11 there was no question of returning Afghanis to Afghanistan. Consider during that period the position of two prospective deportees, one of whom claims asylum, the other not. Could it seriously be argued that there was power to detain the first but not the second? Surely not. Consider, indeed, this very case. The Secretary of State, as it happens, was prepared to regard the appellant’s invalid destination appeal in April 2001 as a fresh asylum application (see paragraph 3 above). Assume that he had not done so - or, indeed, assume that the fresh claim (and the subsequent appeal process) had been determined rather more expeditiously (as, perhaps, it should have been). It would then be clear that it was the political impossibility of removing the appellant which alone was responsible for his continuing detention. Should his position be worse because he can seek to take his asylum claim further still? And would it then improve if he chose not to? The answer to these questions is surely no. I am not saying that if, for whatever reason, whilst a properly detained asylum seeker’s claim is being resolved, a short-term political difficulty arises which would in any event have delayed his return, he thereby necessarily become entitled to be released. I do, however, say that where, as here, there has been no lengthening whatever of the detention period as a result of the asylum claim, the relevant and substantial cause of the detainee’s non-removal should be regarded as the political impossibility of returning him, rather than his claim for asylum. 

37.	As Mr Tam accepts, the ratio of the decision was causation in the form of the political impossibility of removal to Afghanistan. This is made clear both in the passage we have cited and in Dyson LJ’s concurring judgment:
55. As regards the relevance of the appellant’s asylum claim and appeal, I agree that for the reasons given by Simon Brown LJ, this is not material to the reasonableness of the length of detention. The reality in the present case is that the appellant has been detained “pending removal” since 7 February 2001, and that, as a matter of fact, the reason why he has not been removed is not because he has been pursuing an asylum claim. It is because the Secretary of State is unable to remove persons to Afghanistan whom he wishes to deport to that country.

38.	It can be safely deduced from the cases we have so far looked at that there is no such exclusionary principle as Mr Tam contends for; and in our view there are good reasons for not inventing one. But neither these cases nor any of the others we have been shown offer any alternative model. What they repeatedly do is recognise that not only time spent appealing but, to some extent at least, the merit of the appeals and challenges may colour the court’s appraisal of the period spent in detention. Thus in WL and KM itself the court at §102 made the finding set out at §12 above.  
39.	In Strasbourg, too, there have been decisions since Chahal which manifest an open attitude to the relevance of proceedings brought while in administrative detention. In Ryabikin v Russia (2009) 48 EHRR 55, for example, the court held:
134. The Court notes that in the present case the applicant remained in detention between February 25, 2004 and March 14, 2005, that is, for 12 months and 18 days.  As the Government admitted in its observations and has been stated on several occasions by the domestic authorities, the proceedings relating to his extradition were “suspended” for most of that period.  While the Government referred to the interim measure indicated by the Court under r.39 of the Rules of Court, this argument cannot be employed as a justification for the indefinite detention of persons without resolving their legal status.  In the present case it does not appear that the applicant’s detention was in fact justified by the pending extradition proceedings, in the absence of any such decision taken to date.  This finding is exacerbated by the Court’s conclusion above in relation to art.3 that no proper evaluation of the applicant’s allegations under art.3 has taken place in the meantime.  The Court therefore finds that the proceedings concerning the applicant’s detention were not carried out with the requisite diligence.
135. There has therefore been a violation of art.5(1)(f) of the Convention on account of the unlawful nature of the applicant’s detention and the absence of the requisite diligence in the conduct of the proceedings.

Discussion
40.	Mitting J, who had the benefit of Davis J’s judgment, was nevertheless clear in his conclusion that time occupied by appeals and related challenges did not form part of the time spent in detention for Hardial Singh purposes. Davis J himself, however, had taken a different approach. He rejected the Home Secretary’s exclusionary rule, albeit this was subject to specified exceptions. Rather, however, than decide that the period of detention either included or excluded the time spent appealing, he held that although Mr Abdi would have been detained even in the absence of the unlawful policy, on any view a reasonable time for detention had by now elapsed and Mr Abdi must be released.
41.	This was undoubtedly a problematical solution, albeit arrived at in a carefully reasoned judgment. Mr Husain submits that until the principal issue had been decided it was not feasible to say how long Mr Abdi’s detention had lasted for Hardial Singh purposes: if time spent appealing was to be discounted, he had been relevantly detained only for a matter for weeks; if it was to be counted, he had been detained for almost 2½ years. This in turn was central to the question to which the judge turned in §76 (see above). If all he was prepared to hold was that by the date of his judgment Mr Abdi had been detained for longer than was reasonable, it would inevitably be contended, as the cross-appeal now contends, that a reasonable period had expired a good deal earlier.
42.	There are three ways out of the problem posed at the beginning of this judgment: in other words it is not a dilemma but a trilemma. Two of them are the courses proposed respectively by the parties, each of which is capable of causing obvious injustice: either a detainee will be indefinitely penalised for exercising his legal rights, or his detention can be brought to the point of mandatory release simply by persistent litigation. Neither is in our judgment acceptable, though if there were no other option we would no doubt be forced to choose between them. 
43.	In particular, we do not accept either Mr Tam’s characterisation of the pursuit of legal remedies as a “choice” for which the detainee must be prepared to pay a price in terms of liberty; nor his submission that the answer to unduly prolonged detention is bail – a process which concedes the very thing which is in issue, namely the legality of continued detention. His other points (see §29 above) have considerable cogency as a response to a rigid inclusionary rule, but are blunted by the approach which seems to us the right one.
44.	The third way, albeit neither party contends for it, is neither formally to count nor to discount time spent appealing or raising other legal challenges but to recognise that, like everything else affecting the duration of detention, it may have a measure of relevance. What that measure is will always be case- and fact-specific. Where the outcome of an appeal or challenge is clear and certain, that may be relevant, whether for or against the detainee. Where it is not yet known, it will not ordinarily be right for the court to anticipate it. Thus there can be expected to be a meaningful difference, if other factors are equal, between a detainee whose challenges have been largely successful (they will never, in a context of continuing detention, have been wholly successful) and one who has been wasting his own and the authorities’ time.
45.	This was very much the approach settled on by Davis J at §31. Having considered two decisions of Mitting J (Bashir [2007] EWHC 3017 (Admin) and A [2007] EWHC 142 (Admin)), he held, in our judgment rightly, that the case of Q [2006] EWHC 2690 did not lay down a rule that time only began to count for Hardial Singh purposes once appeal rights had been exhausted. He went on:
“Moreover, by the use of the word ‘generally’ Mitting J may well only have been indicating what the position is, as it very often is, in many cases and no doubt properly considered so to be; but nevertheless in a way admitting of exceptions. If so, then I would not disagree. But if Mitting J was intending to go further and is to be taken as indicating a fixed rule of invariable application then I am afraid I must respectfully disagree.”

46.	Thus, just as we reject Mr Tam’s submission that no time spent on appeals  can count for Hardial Singh purposes save in two narrowly defined classes of case, we reject Mr Husain’s foundational proposition (though he sought to modify it) that all such time counts except time spent on abusive appeals. What we do consider assists Mr Husain’s case is the elementary fact that the power of administrative detention contained in Sch. 3, §2, of the 1971 Act is itself predicated on the existence of an appealable administrative decision. To penalise an individual for exercising his right of appeal against the very decision which has taken away his freedom, and to do so by prolonging his detention in direct proportion to the appellate process, is offensive to any sense of fairness. But fairness in no way dictates a diametrically opposite answer. What it calls for is the judgment which Hardial Singh describes and which I  fleshes out. 
47.	Is this then the course which Davis J has taken, or ought he to have gone further before reaching a conclusion? Mr Abdi’s cross-appeal has required a detailed excursion, on which we have been conducted with great skill by Ms Dubinsky, into the facts of his case.

MrAbdi’s cross-appeal 
48.	In paragraph 70 of his judgment Davis J found on the evidence  “that thus far Mr. Abdi has not been unlawfully detained so as to entitle him to damages.  But in all the circumstances he should now be released… on the application of Hardial Singh principles.” He therefore dismissed Mr. Abdi’s claim for damages for unlawful detention and ordered that he be released by 4 pm on 27th May 2009.
49.	If there is one thing on which the parties to this appeal are (albeit for different reasons) agreed, it is the arbitrary character of the judge’s decision that the point at which detention became unlawful coincided with the date of his judgment on 22nd May (or the 27th May, the date by which he ordered Mr. Abdi’s release).  Mr Tam submitted that the arbitrariness was the result of the uncertainty that was caused by the judge’s rejection of the Secretary of State’s submission that time spent pursuing an appeal or other legal proceedings challenging deportation was, subject to only two exceptions, not a relevant consideration.  Miss Dubinsky submitted that the date was arbitrary because all of the factors that led the judge to conclude that further detention would be unlawful were, on the facts found by the judge, present at an earlier date, in April, October or December 2008.
50.	Notwithstanding his submission that the date chosen by the judge was arbitrary, Mr. Tam submitted that this conclusion of the judge was a finding of fact with which this Court should not interfere.  We readily accept that this Court should be very slow to interfere with findings of fact at first instance, but Miss Dubinsky’s submission was not that any of the judge’s findings of primary fact were wrong, it was that those primary facts led to only one conclusion: that Mr. Abdi’s detention had become unlawful well before May 2009, and at the very latest, by December 2008.
51.	The judge found that:
(i)	On 20th April 2008 the Somaliland authorities had told the Home Office that they would refuse to accept Mr. Abdi’s return to Somaliland (para.52).

(ii)	Thereafter the Appellant proceeded on the footing that Mr. Abdi would be returned to Mogadishu (para.53).

(iii)	By October 2008 the Appellant knew of the stance being adopted by the European Court of Human Rights with regard to forced returns to Mogadishu, in cases before the European Court of Human Rights (para.71).

(iv)	That stance was to grant interim measures under Rule 39 of the Rules of Court “across the board” with regard to all expulsions to Mogadishu which came before the court on a “fact insensitive basis” (para.68).

(v)	On 12th December 2008, at the resumed hearing of Mr. Abdi’s appeal to the Asylum and Immigration Tribunal, the latest country guidance on Somalia, AM and AM [2008] UKAIT 00091 was produced, and in the light of that guidance the Home Office Presenting Officer (HOPO) accepted that Mr. Abdi would not be returned to Mogadishu with an expectation that he remain there.  The HOPO argued that Mr. Abdi could relocate to Puntland (para.61, see also para 28 of the Tribunal’s determination dated 30th March 2009).

(vi)	In response to the HOPO’s submission that Mr. Abdi could relocate to Puntland expert evidence was given to the Tribunal on this behalf that there was no safe route to Puntland from Mogadishu, and that Mr. Abdi would not be admitted to Puntland on an EU Travel document (para.61).

52.	By the 12th December 2008 Mr. Abdi had been in immigration detention      for just over 2 years, since completion of his sentence on 30th November 2006.  It had been accepted by the Home Office, even if somewhat belatedly, that he could not reasonably be expected to remain in Mogadishu .  Although it was now being submitted on behalf of the Appellant that Mr. Abdi could be returned to Puntland, issues had been raised both as to the method and safety of route to Puntland (at that time there was no evidence of any  flight other than via Mogadishu), and as to whether Mr. Abdi would be admitted to Puntland.  
53.	In December 2008 the Appellant could not know whether the Tribunal would accept the HOPO’s submission that these outstanding issues did not need to be resolved unless and until removal directions were given (see para 16 of the Tribunal’s determination). However, it should by then have been obvious to the Appellant that removal could not be effected until these two issues had been resolved.  If they were not to be resolved by the Tribunal, then they would probably have to be resolved in proceedings for judicial review, if such proceedings had not been rendered unnecessary by the test case awaiting decision by the European Court of Human Rights (para.69).
54.	Against this background, Davis J accepted Ms. Dubinsky’s submission “that, in the light of the European Court of Human Rights approach and pending final disposal of the relevant test case, if in judicial proceedings an application were made to stay removal to Mogadishu on removal directions which had been set that application might well result in an injunction being granted by the domestic courts” (para.70).
55.	In summary, by the end of 2008 there was no realistic prospect of removing Mr. Abdi to Puntland in the foreseeable future.  At best it could be said that his removal there might be possible, but there was no indication as to when it might be possible.  In paragraph 76 of his judgment Davis J said that enough was enough:
“……The relevant legal proceedings are likely to go on for a long time, so far as concerns Mr Abdi, potentially even running into years…… I do not think that it can now be said that Mr Abdi will be or is likely to be removed within a reasonable time; and I think that by now a reasonable period of time for detaining him has elapsed”.
56.	It was, or should have been, apparent to the Appellant in December 2008 that the relevant legal proceedings were likely to go on for a long time, even running into years.  It could not have been said in December 2008 that Mr. Abdi was likely to be removed within a reasonable time.  After two years of immigration detention there was still no end in sight.
57.	Nothing changed to alter this position between December 2008 and May 2009, save that Mr. Abdi’s detention was prolonged by a further five months.  The judge did not suggest that it was this additional period of detention after December 2008 that rendered Mr. Abdi’s detention lawful before, and unlawful after, the 22nd May 2009.  The Tribunal decided in its determination dated 17th March 2009 that it did not need to resolve the two outstanding issues (safety of route to, and acceptability of EU Documentation in, Puntland): see paras 55 and 56 of its determination.  However, its determination in that respect (subsequently quashed by consent) merely confirmed the approach of the Appellant in December 2008: that these issues would have to be resolved if and when removal directions were made.
Conclusions
58.	In our judgment Davis J’s approach was legally correct, and that of Mitting J, by the same token, flawed. Just as Mitting J was wrong to discount without more the time spent by Mr Khalaf on appeals and legal challenges, Davis J would have been wrong to count it without more. In both cases the proper course was, on ordinary public law principles, to have regard to what had happened since the start of detention and to why; to give each element the weight it merited; to look at these and any other material factors in the context of the period so far spent in detention; and to ask whether in this light more time had now elapsed, or was about to elapse, than in all the circumstances was a reasonable time for effecting the statutory purpose.
59.	We would endorse the approach of Davis J in paragraph 31 of his judgment (see §44 above). In general, appeals (including appeals by the Secretary of State) will be of little if any weight by themselves in deciding whether the period of detention was or has been unreasonable. But a crucial, and related, question will be whether at any time it was apparent that removal would not be possible within a reasonable time. Even the decision of the European Court of Human Rights to give a Rule 39 indication will not necessarily render continuing detention unreasonable, since the Court may revoke that order on the basis of representations made by the Home Secretary or a decision of that court or of our courts.
60.	Even where the Court has concluded that the duration of detention has in the past been unreasonable, if when the matter comes before the Court it appears that the detainee will be removed within a reasonable time, it would not be appropriate to order his release, whatever his remedy may be in relation to his previous detention. In such a case, when the matter comes before the Court, the detainee is being detained for the statutory purpose.
61.	In some cases it may be very difficult, applying Hardial Singh principles, to identify any particular date on which detention has ceased to be lawful.  Any date will inevitably be “arbitrary” to some extent, and adopting the date of the judgment may well be the best that the judge can do on the available evidence.  However, in the present case, allowing a reasonable time for those officials in the Home Office responsible for authorising Mr. Abdi’s continued detention to appreciate the implications of the HOPO’S concession at the resumed Tribunal hearing on 12th December 2008, it should have been, even if it was not, obvious to them by the 19th December 2008 that it was not going to be possible to effect removal within a reasonable time, so that detention was no longer justified.
62.	The judges of the Administrative Court frequently face a difficult task in deciding whether detention has continued for an unreasonable time, and if it has at what point in time it became unreasonable. This Court will not interfere with the judge’s decision unless it can be shown that what is a difficult exercise of judgment is inconsistent with his findings of primary fact, or was based on an incorrect understanding of the law, or was one that was not sensibly open to him on the basis of those facts.
63.	In Mr Khalaf’s case no such judgment has yet been reached. Although he is on bail he is still entitled to have the legality of the underlying detention determined. We shall therefore welcome counsel’s submissions on the most appropriate disposal of his appeal.
64.	In Mr Abdi’s case, for the reasons we have given, we propose to dismiss the Home Secretary’s appeal.  We allow the cross-appeal and grant the Respondent a declaration that his detention from 19 December 2008 until he was released by order of Davis J was unlawful.