5.  The facts of the case, as submitted by the parties, may be summarised as follows.
6.  The applicant was born in 1975 and is currently detained in HMP Brixton.
7.  The applicant arrived in the United Kingdom on 7 May 1995 and claimed asylum. The asylum claim was refused but he was granted exceptional leave to remain until February 2000.
8.  On 23 July 1998 the applicant was convicted of offences of rape and indecency with a child and sentenced to eight years’ imprisonment.
9.  On 20 May 2002 the Secretary of State for the Home Department issued the applicant with a decision to make a deportation order and on 27 May 2002 he issued an authority for detention until the making of a deportation order.
10.  On 2 July 2002 the applicant appealed against the decision to make a deportation order and made a fresh claim for asylum. The appeal was unsuccessful and his appeal rights were exhausted on 4 December 2003.
11.  In early 2003 the applicant was interviewed by probation officers who found that he was not suitable for parole. During his time in prison he had received fourteen charges relating to offences against prison discipline. Six of these offences involved fighting. Moreover, he was assessed as presenting a high risk of sexual offending and a medium risk of general offending on release.
12.  On 3 September 2003 the applicant’s release became automatic. However, he remained in detention pursuant to the authority issued on 27 May 2002.
13.  On 5 April 2004 the Secretary of State for the Home Department issued a deportation order which included a paragraph authorising the applicant’s detention until his deportation. The order was served on the applicant on 19 April 2004.
14.  The applicant had claimed to be a member of the Isaaq tribe, which comes from Somaliland, an autonomous region in north-west Somalia. He further claimed that his parents were born in Hargeisa, the capital of Somaliland, although it was accepted that he was born in Mogadishu, in south-central Somalia. Consequently, the authorities initially sought to return the applicant to Somaliland. However, in order to secure the agreement of the Somaliland authorities to the return of a Somalilander to their territory, detailed information about clan-history was required. This was normally done through the provision of bio-data, but this was often difficult to obtain as it required the co-operation of the Somalilander. Consequently, few Somalilanders were returned to Somaliland at this time. As the applicant did not co-operate with the provision of bio-data, the Government decided that it would be preferable to remove him to Somalia.
15.  In August 2004 the last carrier willing to take “enforced returns” to Somalia withdrew, with the consequence that it was no longer possible for the Government to remove people without their consent. The carriers were, however, willing to carry those who had signed a disclaimer confirming that they were returning voluntarily. In November 2004 the applicant refused a formal request to sign such a disclaimer.
16.  On 20 December 2004 an application for bail was refused by the Chief Immigration Officer.
17.  In March 2005 the applicant made further representations for asylum. In September 2005 the Secretary of State for the Home Department refused to treat those representations as a fresh claim.
18.  On 11 October 2005 the applicant was again refused bail. In the course of the hearing, however, the immigration judge was wrongly informed that enforced removals to Somalia would be possible in the foreseeable future.
19.  In July 2006 the Government concluded an agreement with African Express Airlines which made enforced removals to Somalia possible. The first enforced removal to Somalia took place on 30 November 2006.
20.  On 25 September 2006 the applicant was granted permission to apply for judicial review of the decision to detain him but an application for interim relief in the form of an order that he be released from detention was refused.
21.  The applicant was issued with removal directions set for 29 November 2006. He sought leave to apply for judicial review of the removal directions and the directions were cancelled pending a decision on that application.
22.  The application for judicial review of the decision to detain the applicant was considered by Mr Justice Calvert-Smith in a judgment handed down on 7 December 2006. The judge reiterated the principles established by domestic case-law, most notably in the case of R v Governor of Durham Prison, ex parte Hardial Singh [1984] WLR 704: first, that the Secretary of State for the Home Department could only detain a person that he intended to deport for what amounted to a reasonable period in all the circumstances; and secondly, that if, before the expiry of a reasonable period, it became apparent that the Secretary of State would not be able to effect deportation within a reasonable period, he should not seek to exercise the power of detention.
23.  The judge first considered the lawfulness of the applicant’s detention up until August 2004. He was satisfied that from 3 September 2003 to August 2004 the Secretary of State had exercised comparative diligence to overcome the obstacles and remove the applicant. In particular, he noted that the applicant could not have been removed between September 2003 and December 2003 because his asylum and deportation appeals were still pending, and between December 2003 and April 2004 he could not be removed because no deportation order had been served. When considered alongside the objections to bail (the risk of re-offending and the risk of absconding), he held that on balance the continued detention of the applicant up to August 2004 was lawful.
24.  The period of detention from 3 December 2004, which was the date of the applicant’s first review following his refusal to return voluntarily, to 30 June 2006 was found to be unlawful because of its length, the impossibility during that period of achieving removal, and the misleading statements which had misled decision-makers both inside and outside the Home Department.
25.  The judge held that the applicant’s detention after 30 June 2006 was lawful as once again there was a prospect of immediate removal.
26.  Both the applicant and the Secretary of State were granted leave to appeal to the Court of Appeal. The Secretary of State contended that the application for judicial review ought to have been dismissed, while the applicant submitted that his continued detention after 30 June 2006 should have been held to be unlawful.
27.  In a judgment handed down on 30 July 2007, the Court of Appeal allowed the appeal by the Secretary of State and dismissed the applicant’s appeal. The court held that the period of detention between 3 December 2004 and 30 June 2006 was lawful because the applicant could have returned to Somalia voluntarily. Moreover, the risk of the applicant reoffending was high, which was a worrying prospect in view of the nature of his previous offence. The court held that it was wrong in principle to offset those factors against the applicant’s concerns about returning to Somalia as his removal had already been held not to be in breach of the Refugee Convention or Article 3 of the European Convention on Human Rights.
28.  On 13 December 2007 the applicant was refused permission to appeal to the House of Lords.
29.  On 1 February 2007 the Secretary of State issued a decision refusing to revoke the deportation order. An Immigration Judge allowed the applicant’s appeal. On 10 May 2007 the Asylum and Immigration Tribunal ordered reconsideration of the Immigration Judge’s decision. The reconsideration hearing took place on 26 February 2008. The Tribunal held that the Immigration Judge had materially erred in law and ordered that the case be reheard. The rehearing took place on 18 December 2008 and, in a determination promulgated on 1 July 2009, the Tribunal dismissed the appeal. The applicant was granted permission to appeal to the Court of Appeal on 18 December 2009. In a judgment dated 23 April 2010 the Court of Appeal allowed the appeal, finding that the applicant would be at risk of ill-treatment which reached the threshold required by Article 3 of the Convention if he were to be removed to Mogadishu. However, on 24 November 2010 the Supreme Court allowed the appeal by the Secretary of State for the Home Department.
30.  On 6 December 2010 the applicant was issued with removal directions to Somalia. The removal was to take place on 8 December 2010. On 7 December 2010 the Court granted the applicant interim measures under Rule 39 of the Rules of Court to prevent his removal.
31.  The applicant remains in immigration detention pending removal. On 13 April 2007 the Asylum and Immigration Tribunal had ordered that he be released from detention on bail. He was released early the following week but was re-detained on 3 April 2008 after breaching his bail conditions.
32.  The present application is only concerned with the first period of detention, which ended shortly after 13 April 2007.
33.  During the applicant’s detention from 3 September 2003 to 13 April 2007, reviews were carried out in November 2003, March 2004, June 2004, September 2004, October 2004, November 2004, January 2005, March 2005, May 2005, July 2005, September 2005, October 2005, December 2005, January 2006, February 2006, June 2006, September 2006, October 2006, December 2006, January 2007, February 2007 and March 2007.
34.  In April 2006 the Home Office introduced a “secret” policy creating a presumption in favour of the detention of Foreign National Prisoners pending their deportation. The policy, which was not disclosed until mid-2008 and was not formally published until September 2008, constituted a “near blanket ban” on release. During this period, the Secretary of State’s published policy on the detention of Foreign National Prisoners stated that there was a presumption in favour of release. The lawfulness of this policy was considered by the Supreme Court in the cases of Walumba Lumba and Kadian Mighty v. Secretary of State for the Home Department [2011] UKSC 12 (see paragraph 37, below).