On 19 May 2016, in J.N. v UK the Strasbourg Court provided a useful detailed overview of its case law principles concerning lawfulness of migrant detention in view of deportation:
74. Article 5 of the Convention enshrines a fundamental human right, namely the protection of the individual against arbitrary interference by the State with his or her right to liberty. Subparagraphs (a) to (f) of Article 5 § 1 contain an exhaustive list of permissible grounds on which persons may be deprived of their liberty and no deprivation of liberty will be lawful unless it falls within one of those grounds. One of the exceptions, contained in subparagraph (f), permits the State to control the liberty of aliens in the immigration context (see, as recent authorities, Saadi v. the United Kingdom [GC], no. 13229/03, § 43, ECHR 2008, and A. and Others v. the United Kingdom [GC], no. 3455/05, §§ 162‑63, 19 February 2009).
75. It is well established in the Court’s case-law under the sub‑paragraphs of Article 5 § 1 that any deprivation of liberty must, in addition to falling within one of the exceptions set out in sub-paragraphs (a) to (f), be “lawful”. In other words, it must conform to the substantive and procedural rules of national law (Amuur v. France, 25 June 1996, § 50, Reports 1996‑III, and Abdolkhani and Karimnia v. Turkey, no. 30471/08, § 130, 22 September 2009).
76. In assessing the “lawfulness” of detention, the Court may have to ascertain whether domestic law itself is in conformity with the Convention, including the general principles expressed or implied therein. On this last point, the Court stresses that, where deprivation of liberty is concerned, it is particularly important that the general principle of legal certainty be satisfied.
77. In laying down that any deprivation of liberty must be effected “in accordance with a procedure prescribed by law”, Article 5 § 1 does not merely refer back to domestic law; like the expressions “in accordance with the law” and “prescribed by law” in the second paragraphs of Articles 8 to 11, it also relates to the “quality of the law”. “Quality of law” in this sense implies that where a national law authorises deprivation of liberty it must be sufficiently accessible, precise and foreseeable in its application, in order to avoid all risk of arbitrariness (see Nasrulloyev v. Russia, no. 656/06, § 71, 11 October 2007; Khudoyorov v. Russia, no. 6847/02, § 125, ECHR 2005‑… (extracts); Ječius v. Lithuania, no. 34578/97, § 56, ECHR 2000-IX; Baranowski v. Poland, no. 28358/95, §§ 50-52, ECHR 2000-III; and Amuur, cited above). Factors relevant to this assessment of the “quality of law” – which are referred to in some cases as “safeguards against arbitrariness” – will include the existence of clear legal provisions for ordering detention, for extending detention, and for setting time-limits for detention (Abdolkhani and Karimnia, cited above, § 135 and Garayev v. Azerbaijan, no. 53688/08, § 99, 10 June 2010); and the existence of an effective remedy by which the applicant can contest the “lawfulness” and “length” of his continuing detention (Louled Massoud v. Malta, no. 24340/08, § 71, 27 July 2010).
78. In addition to the requirement of “lawfulness”, Article 5 § 1 also requires that any deprivation of liberty should be in keeping with the purpose of protecting the individual from arbitrariness (see, among many other authorities, Saadi v. the United Kingdom, cited above, § 6; and Chahal v. the United Kingdom, 15 November 1996, § 118, Reports of Judgments and Decisions 1996‑V). It is a fundamental principle that no detention which is arbitrary can be compatible with Article 5 § 1 and the notion of “arbitrariness” in Article 5 § 1 extends beyond lack of conformity with national law, so that a deprivation of liberty may be lawful in terms of domestic law but still arbitrary and thus contrary to the Convention.
79. While the Court has not formulated a global definition as to what types of conduct on the part of the authorities might constitute “arbitrariness” for the purposes of Article 5 § 1, key principles have been developed on a case-by-case basis. It is moreover clear from the case-law that the notion of arbitrariness in the context of Article 5 varies to a certain extent depending on the type of detention involved.
80. One general principle established in the case-law is that detention will be “arbitrary” where, despite complying with the letter of national law, there has been an element of bad faith or deception on the part of the authorities (see, for example, Bozano v. France, 18 December 1986, Series A no. 111, and Čonka v. Belgium, no. 51564/99, ECHR 2002-I). Furthermore, the condition that there be no arbitrariness further demands that both the order to detain and the execution of the detention genuinely conform with the purpose of the restrictions permitted by the relevant sub‑paragraph of Article 5 § 1 (see Winterwerp v. the Netherlands, 24 October 1979, § 39, Series A no. 33). There must in addition be some relationship between the ground of permitted deprivation of liberty relied on and the place and conditions of detention (see Aerts v. Belgium, 30 July 1998, § 46, Reports 1998-V; and Enhorn v. Sweden, no. 56529/00, § 42, ECHR 2005-I).
81. Where a person has been detained under Article 5 § 1(f), the Grand Chamber, interpreting the second limb of this sub-paragraph, held that, as long as a person was being detained “with a view to deportation”, that is, as long as “action [was] being taken with a view to deportation”, Article 5 § 1(f) did not demand that detention be reasonably considered necessary, for example, to prevent the individual from committing an offence or fleeing. It was therefore immaterial whether the underlying decision to expel could be justified under national or Convention law (see Chahal, cited above, § 112; Slivenko v. Latvia [GC], no. 48321/99, § 146, ECHR 2003 X; Sadaykov v. Bulgaria, no. 75157/01, § 21, 22 May 2008; and Raza v. Bulgaria, no. 31465/08, § 72, 11 February 2010).
82. Consequently, the Grand Chamber held in Chahal that the principle of proportionality applied to detention under Article 5 § 1 (f) only to the extent that the detention should not continue for an unreasonable length of time; thus, it held 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” (Chahal, § 113; see also Gebremedhin [Gaberamadhien] v. France, no. 25389/05, § 74, ECHR 2007-II). Indeed, the Court of Justice of the European Union has made similar points in respect of Article 15 of Directive 2008/115/EC (in the 2009 case of Kadzoev) and in respect of Article 9(1) of Directive 2013/13 (in the 2016 case of J.N.) (see paragraphs 42 and 44 above).
83. The Court has unequivocally held that Article 5 § 1(f) of the Convention does not lay down maximum time-limits for detention pending deportation; on the contrary, it has stated that the question whether the length of deportation proceedings could affect the lawfulness of detention under this provision will depend solely on the particular circumstances of each case (see A.H. and J.K. v. Cyprus, nos. 41903/10 and 41911/10, § 190, 21 July 2015; Amie and Others v. Bulgaria, no. 58149/08, § 72, 12 February 2013; Auad v. Bulgaria, no. 46390/10, § 128, 11 October 2011; and Bordovskiy v. Russia, cited above, § 50, 8 February 2005). Consequently, even where domestic law does lay down time-limits, compliance with those time-limits cannot be regarded as automatically bringing the applicant’s detention into line with Article 5 § 1(f) of the Convention (Gallardo Sanchez v. Italy, no. 11620/07, § 39, ECHR 2015; Auad, cited above, § 131).
84. In a series of Russian cases the Court has considered the existence ‑ or absence – of time-limits on detention pending extradition to be relevant to the assessment of the “quality of law” (see, for example, Azimov v. Russia, no. 67474/11, § 171, 18 April 2013; Ismoilov and Others v. Russia, no. 2947/06, §§ 139-140, 24 April 2008; Ryabikin v. Russia, no. 8320/04, § 129, 19 June 2008; Muminov v. Russia, no. 42502/06, § 121, 11 December 2008; and Nasrulloyev v. Russia, no. 656/06, §§ 73-74, 11 October 2007). In these cases the Court was addressing a recurring problem of uncertainty over whether a provision of domestic law laying down the procedure and specific time-limits for reviewing detention applied to detention pending extradition. In light of this uncertainty, in a number of those cases the Court held that the domestic law was not sufficiently precise or foreseeable to meet the “quality of law” standard. In other words, the deprivation of liberty to which the applicants were subjected was not circumscribed by adequate safeguards against arbitrariness (see, for example, Nasrulloyev, cited above, § 77).
85. The Court adopted a similar approach in Louled Massoud, cited above, § 71, in which it found that the Maltese legal system did not provide for a procedure capable of avoiding the risk of arbitrary detention pending deportation. It reaching this conclusion it noted that, in the absence of time‑limits, the applicant was subject to an indeterminate period of detention, and the necessity of procedural safeguards (such as an effective remedy by which to contest the lawfulness and length of his detention) therefore became decisive.
86. In Abdolkhani and Karimnia, cited above, § 135 and Garayev, cited above, § 99 the Court held that in the absence of clear legal provisions establishing the procedure for ordering and extending detention or extradition with a view to deportation and setting time-limits for such detention, the deprivation of liberty to which the applicants were subjected was not circumscribed by adequate safeguards against arbitrariness. Similarly, in Mathloom v. Greece, no. 48883/07, § 71, 24 April 2012, although the Court’s conclusions refer to the fact that “the relevant provisions of domestic law governing the detention of persons under judicial expulsion do not set the maximum length of such detention”, it is clear from the preceding paragraphs that it also viewed as significant the fact that the applicant had been detained for “an unreasonably long period” (more than two years), during which time his expulsion had not been possible. Consequently, the relevant authorities had failed to exercise “due diligence”.
(iii) Automatic judicial review
87. Although the Court has made it clear that the existence of an effective remedy by which to contest the lawfulness and length of detention may be a relevant procedural safeguard against arbitrariness (Louled Massoud, cited above, § 71), it has not, to date, held that Article 5 § 1(f) requires automatic judicial review of detention pending deportation. In fact, as with time-limits, it has found that the existence of such a remedy will not guarantee that a system of immigration detention complies with the requirements of Article 5 § 1(f) of the Convention; for example, in Auad, cited above, § 132 it found that the fact that the applicant’s detention was subject to automatic periodic judicial review provided an important safeguard against arbitrariness but could not be regarded as decisive.
88. In the context of Article 5 § 4, the Court has made it clear that that provision’s requirement that “everyone who is deprived of his liberty … shall be entitled to take proceedings by which the lawfulness of his detention shall be decided speedily by a court” does not impose a uniform, unvarying standard to be applied irrespective of the context, facts and circumstances (Louled Massoud, cited above, § 40). Nevertheless, the Court has provided some guidance on what might constitute an “effective remedy”. First, the remedy must be made available during a person’s detention to allow that person to obtain speedy review of its lawfulness. Secondly, that review must have a judicial character and provide guarantees appropriate to the type of deprivation of liberty in question (see Louled Massoud, cited above, § 40 and A. and Others v. the United Kingdom [GC], no. 3455/05, § 203, ECHR 2009‑…). Thirdly, the review should also be capable of leading, where appropriate, to release. Finally, it must be sufficiently certain, not only in theory but also in practice, failing which it will lack the accessibility and effectiveness required for the purposes of that provision (see Muminov, cited above, § 113, and Ismoilov, cited above, § 145, 24 April 2008).