FIFTH SECTIONCASE OF NUR AHMED AND OTHERS v. UKRAINE(Applications nos. 42779/12 and 5 others)    JUDGMENT  This version was rectified on 3 July 2020under Rule 81 of the Rules of Court   STRASBOURG18 June 2020 This judgment is final but it may be subject to editorial revision.In the case of Nur Ahmed and Others v. Ukraine,The European Court of Human Rights (Fifth Section), sitting as a Committee composed of: André Potocki, President, Lәtif Hüseynov, Anja Seibert-Fohr, judges,and Victor Soloveytchik, Deputy Section Registrar,Having deliberated in private on 5 May 2020,Delivers the following judgment, which was adopted on that date:PROCEDURE1. The case originated in six applications against Ukraine lodged with the Court under Article 34 of the Convention for the Protection of Human Rights and Fundamental Freedoms (“the Convention”) on the various dates listed in the Appendix by nine nationals of Somalia whose details are listed in the Appendix.2. The first applicant was represented by Ms N. Gurkovska, a lawyer practising in Kyiv, and Ms J. Gordon of the European Human Rights Advocacy Centre in London. At the time the applications were lodged, that applicant was also represented by Ms H. Bocheva, at the time a lawyer practising in Kyiv. The other applicants were represented by Ms Gurkovska. The Ukrainian Government (“the Government”) were represented by their Agent, Mr I. Lishchyna.3. The applicants complained that their deprivation of liberty under domestic court’s detention orders had been contrary to Article 5 § 1 (f) of the Convention since there had been no realistic possibility of their being expelled to Somalia and the proceedings for their expulsion had not been conducted with the requisite diligence.The second to sixth applicants also complained that their arrest by the police and detention prior to the issuance of the above-mentioned court orders had had no basis in domestic law.The first and sixth to ninth applicants further complained that the proceedings concerning their appeals against the above-mentioned detention orders had not met the requirement of “speediness” of Article 5 § 4 of the Convention.4. On 20 September 2016 the Government were given notice of the above complaints and the remainder of the applications was declared inadmissible pursuant to Rule 54 § 3 of the Rules of Court.THE FACTSTHE CIRCUMSTANCES OF THE CASE5. The applicants left Somalia and on various dates entered Ukraine from Russia in an irregular manner without any documents certifying their identity or authorising their entry or stay. They stayed in Vinnytsya where they were subsequently arrested by police as undocumented migrants.The applicants’ arrest and the issuance of detention orders6. The first and sixth to ninth applicants (hereinafter “the December Group”) were arrested on 23 December 2011, the first applicant at an unspecified hour and the sixth to ninth applicants at 5 a.m. The second to fifth applicants (hereinafter “the January Group”) were arrested on 30 January 2012 at 6 a.m. The applicants alleged that, following their arrest, and before being brought to court (see paragraph 8 below) they were detained in police stations.7. On the same day (23 December 2011 and 30 January 2012 respectively) the police and migration authorities asked the Vinnytsya Circuit Administrative Court (hereinafter “the Circuit Court”) to place the applicants in a “centre for temporary accommodation of foreigners and stateless persons who are present in Ukraine illegally” (hereinafter “the centre” or “the temporary accommodation centre” – see paragraphs 44 to 53 below for the legislation governing the functioning of such centres) for the period of time necessary for arranging their expulsion.8. The Circuit Court held hearings in each of the applicants’ cases on the same days. According to the applicants, the hearings were held late in the evening. At the close of the hearings the court allowed the applications. It found it established that the applicants had entered Ukraine illegally from Russia having intentionally destroyed their identity documents before crossing the border. In view of the need to arrange the applicants’ expulsion, the court issued orders authorising their arrest (затримання) and placement in a temporary accommodation centre for up to twelve months.9. As legal grounds for the decisions, the court cited in respect of the December Group, section 32 of the Aliens Act 1994 and, in respect of the January Group, section 30(1), (3) and (4) of the Aliens Act 2011 (which came into force on 25 December 2011, see paragraphs 34, 36 and 40 below respectively). In respect of the January Group the court also referred to sections 14(2) of the Aliens Act 2011, which permitted arrest of aliens who had crossed the border outside of authorised ports of entry (see paragraph 38 below).10. After the hearings, administrative-arrest reports were drawn up in respect of all applicants, in the period of time from 8.30 p.m. to 11.55 p.m., indicating as grounds for arrest enforcement of the Circuit Court’s orders.11. The December Group applicants were transferred to the Zhuravychi temporary accommodation centre in Volyn Region and the January Group applicants to Rozsudiv temporary accommodation centre in Chernigiv Region.Appeals against detention orders12. On 28 December 2011 the applicants’ lawyer Ms Gurkovska appealed on behalf of the December Group applicants and on 6 February 2012 on behalf of the January Group applicants. She argued, in particular, that there had been no grounds for arresting them or ordering their detention since they could not be expelled to Somalia owing to risks they faced there.13. In her appeals on behalf of the December Group the lawyer also argued that, since there had been no decisions ordering the applicants’ expulsion, they could not be detained because, according to her interpretation of domestic law (section 32 of the 1994 Aliens Act, see paragraph 36 below) detention could only be ordered once an expulsion decision had been taken and no such decision had been taken against them.14. On 3 January 2012 the lawyer supplemented her appeals on behalf of the December Group applicants, using some of the same arguments.15. On 10 January and 17 February 2012 respectively the Vinnytsya Administrative Court of Appeal held hearings on the December and January Group applicants’ appeals.16. In the course of the hearing concerning the January Group applicants, their representative argued that their detention was unlawful because, under section 30 (paragraph 4) of the 2011 Aliens Act (see paragraph 40 below), detention could only be ordered once an expulsion decision have been taken and no such decision had been taken against them.17. At the close of the hearings the Court of Appeal upheld the detention orders concerning the December and January Group applicants. It held, in particular, that their detention had been lawful and based on the Aliens Acts 1994 and 2011.18. The lawyer lodged appeals on points of law on behalf of the December and January Group applicants with the Higher Administrative Court relying on essentially the same arguments as those raised before the Court of Appeal, in particular those set out in paragraphs 13 and 16 above. The appeals were lodged on the following dates: on behalf of the first applicant on 30 January 2012, the sixth and seventh applicants on 6 February and the eighth and ninth applicants on 2 February 2012. The appeals on behalf of the January Group applicants were lodged on unspecified dates between 2 February and 13 March 2012.19. The Higher Administrative Court rejected the December Group applicants’ appeals on the dates set out in the Appendix. It held that there had been no illegality in the lower courts’ decisions.20. According to the most recently available information, as of 30 November 2015, the second applicant’s appeal on points of law was still pending. As for the other January Group applicants, on 14 May 2014 the Higher Administrative Court rejected the third to fifth applicants’ appeals on points of law, holding that the lower courts’ decisions were not unlawful.Preparation of the applicants’ expulsion, asylum proceedings and the applicants’ release21. On 13 January and on 8 February 2012 the police wrote to the Embassy of Somalia in Moscow to have passports or temporary travel documents issued to the December Group and January Group applicants respectively.22. On 24 February 2012 the first applicant applied for asylum. His application was refused on 10 August 2012. On 5 November 2012 and 1 February 2013 the Vinnytsya Circuit Administrative Court and the Lviv Administrative Court of Appeal respectively upheld that decision.23. On 17 February 2012 the eighth applicant applied for asylum. Her application was refused on 10 August 2012. On 5 November 2012 the Volyn Circuit Administrative Court quashed that decision and directed the migration authorities to re-examine the applicant’s application. On 14 February 2013 and 27 March 2014 this decision was upheld by the Lviv Administrative Court of Appeal and the Higher Administrative Court respectively.24. The sixth, seventh and ninth applicants were granted subsidiary‑protection status in Ukraine on 10 August, 5 November and 22 May 2012 respectively.25. The applicants were released or escaped from the temporary accommodation centres on the dates set out in the Appendix.26. With respect to the second applicant an expulsion decision was taken on 25 April 2013, that is to say after he had left the temporary accommodation centre. There is no indication that an expulsion decision was ever taken in respect of any other applicant at any point.RELEVANT DOMESTIC LAW AND PRACTICECode of Administrative Offences 198427. Under Article 261 of the Code, when an arrest is effected under the provisions of the Code, an arrest report must be drawn up. It must state the name of the official drawing up the report, the identity of the arrested person, time of arrest and reasons for arrest. The report must be signed by the arresting official and the arrestee.28. Under Article 263, a person who has violated border regulations may be arrested for up to three hours so that an official report may be prepared charging him or her with the violation. If it is necessary to establish the identity of the person concerned and verify the circumstances of the offence, he or she may be detained for up to three days. Written notice must be given to a prosecutor within twenty-four hours of the arrest.29. Article 204-1[1] makes illegal border-crossing punishable by a fine or by short-term detention of up to fifteen days.Code of Administrative Justice30. The Code of Administrative Justice was enacted in 2005 and was entirely revised by Law no. 2147-VIII of 3 October 2017, with effect from 15 December 2017. In the following paragraphs the provisions of the 2005 and 2017 versions are referred to as “the 2005 Code” and “the 2017 Code” respectively.31. Article 183 § 1 of the 2005 Code provided:“Appeals by foreign nationals or stateless persons (‘aliens’) against expulsion decisions and claims by [police, border guards and security service] asking for such expulsion and for arrest in connection with such expulsion [позовні заяви ... про примусове видворення іноземців та осіб без громадянства і затримання їх у зв’язку з таким видворенням] shall be lodged with the circuit administrative court ...”In §§ 5 and 6 of the same Article it was provided that appeals against circuit courts’ decisions in such proceedings could be lodged within five days and had to be examined by the appellate courts within five days of the appeal being lodged. Article 183 § 8 provided that a further appeal on points of law (appeal in cassation) could be lodged with the Higher Administrative Court.32. Article 195 § 1 of the 2005 Code provided that the appellate court had to review the case within the limits of points raised in the appeal but the appellate court could go beyond those points where, in the course of appeal proceedings, it has been established that the first-instance court committed an error of law which led to an erroneous decision on the substance. As far as proceedings for review on points of law before the Higher Administrative Court were concerned, Article 220 § 2 of the Code likewise provided that that court had to review the cases within the limits of the points of law raised in an appeal but could go beyond those points if it identified breaches of substantive or procedural law not raised by the appellant.33. Article 289 of the 2017 Code established an amended procedure for examination of cases concerning detention of aliens. It provides that initially detention of aliens with a view to their expulsion is to be ordered for six months, with possible subsequent extensions in the event of difficulties in organising expulsion, for six months at a time and for a total of eighteen months.Legal Status of Foreign Nationals and Stateless Persons Acts 1994 and 2011 (“the Aliens Act 1994” and “the Aliens Act 2011” respectively)34. The applicants of the December Group were placed in temporary accommodation centres under the Aliens Act 1994, which had been in effect prior to 25 December 2011. The applicants of the January Group were placed there under the Aliens Act 2011, which had replaced the 1994 Act with effect from 25 December 2011.Aliens Act 199435. Section 28(1) of the 1994 Act authorised the arrest of foreign nationals and Stateless persons (hereinafter also called “aliens”) who had crossed Ukraine’s border outside an authorised port of entry.36. At the relevant time (from 5 May to 24 December 2011) section 32 of the 1994 Act, as amended by law of 5 April 2011, provided:“Aliens arrested for being illegally present in Ukraine (contrary to a ban on entry, in the absence of legal grounds of presence provided by domestic law or international treaties ..., including the use of forged, damaged or not matching visa, permit or passport) or those admitted into Ukraine under readmission treaties... shall, pursuant to an order of an administrative court, be placed in centres for temporary accommodation... for the period necessary for the preparation of their expulsion from Ukraine, not to exceed twelve months.”37. Prior to 5 May 2011 the maximum period of detention in the circumstances described in the preceding paragraph had been six months.Aliens Act 201138. Section 14(2) of the 2011 Act provides that:“2. Aliens who have crossed Ukraine’s border illegally outside of an authorised port of entry shall be arrested [затримуються] and, provided they have not committed a criminal offence, shall be returned, pursuant to the procedure established by law, to the country where they were previously present [повертаються до країни попереднього перебування у встановленому порядку].”39. Section 26 lays down the procedure for the compulsory return (примусове повернення) of aliens to their country of origin or a third country. In particular, the State Security Service, border guards or immigration authorities can order the return of an alien whose actions have violated the regulations concerning the legal status of aliens. The decision must include reasons and indicate the period of time during which the alien must leave Ukraine (not exceeding thirty days).40. At the relevant time section 30 read, in so far as relevant, as follows:Section 30. Compulsory expulsion [примусове видворення] of aliens“1. [Migration authorities, border guards and the Security Service] may, solely on the basis of a decision of an administrative court, expel from Ukraine an alien who has failed to comply with a return decision or if there are grounds to believe that the alien would not comply ...2. Appeals can be lodged against the court’s decision on forcible expulsion of aliens, pursuant to the procedure provided by law.3. [Migration authorities or border guards] on the basis of the respective decision shall place [на підставі відповідного рішення розміщує] the aliens referred to in paragraph 1 of this section in temporary accommodation centres for aliens...4. Aliens shall remain [перебувають] in temporary accommodation centres for the period necessary for enforcement of the judicial decision on forcible expulsion but not more than twelve months....8. This section shall not apply to refugees and persons that are granted subsidiary protection.”41. On 19 May 2016 paragraph 4 of section 30 of the Act was amended by Law no. 1379-VIII. It now reads, in so far as relevant, as follows:“4. Aliens who have no legal grounds for being present in Ukraine, who are duly arrested and are subject to expulsion, including those admitted into Ukraine under readmission treaties, shall be placed in centres for temporary accommodation ... for the period necessary for their identification and the preparation of their expulsion from Ukraine or readmission, for up to eighteen months ...”Refugees and Persons in Need of Subsidiary or Temporary Protection Act 201142. Section 14 of the Act provides that individuals granted subsidiary‑protection status enjoy the same rights as citizens of Ukraine, unless otherwise provided by law, and are considered to be legally resident in Ukraine on an indefinite basis. Section 15 provides that they are entitled to freely travel, reside and work in Ukraine, and to exercise a number of other rights.43. Section 17 of the Act provided that asylum-seekers could appeal against decisions rejecting asylum claims to the courts.Rules concerning centres for temporary accommodation of foreigners and Stateless individuals who are present in Ukraine illegally (пункти тимчасового перебування іноземців та осіб без громадянства, які незаконно перебувають в Україні)44. Regulations governing the centres were enacted by the resolution of the Cabinet of Ministers of 17 July 2003 no. 1110 and were in force at the relevant time. Section 16 of the regulations provided that premises of the centres had to be surrounded by a solid fence with a checkpoint at the entry (територія пункту перебування огороджується парканом суцільного заповнення з контрольно-пропускним пунктом).45. At the time the centres were under the authority of the Ministry of the Interior, which, by its order of 16 October 2007 no. 390, enacted regulations governing them.46. Sections 3(1)(13)-(17) required that arrestees (затримані) to be placed at the centres be searched at intake.47. Section 3(3)(2) provided that aliens placed in the centre could circulate freely within the limits of the centre designated by its management and, with the management’s written permission, leave the centre and freely move within the relevant territorial entity where the centre was located.48. Section 3(3)(3) provided that centre residents had to be placed in multiple occupancy dormitories. However, individuals prone to violence, who posed danger to the staff, themselves or others, or who were a flight risk, had to be placed in separate single or double rooms (одно- або двомісних локалізованих кімнатах) for fifteen days or, if the individual continued to present those risks, up to thirty days (section 3(3)(4)). Individuals kept in such rooms had to be allowed at least two hours’ daily exercise outside in special courtyards under supervision of a guard (sections 3(3)(14)-(16)).49. Section 4 regulated the functions and organisation of the centres’ guards. It stated, in particular, that the function of the guards was to prevent the residents from leaving without authorisation. It provided that guarding duties were to be carried out by police officers who were to be unarmed but carrying self-defence equipment (section 4(1)(8)).50. Section 4(1)(10) prohibited the use of weapons to apprehend an alien who had “escaped” (учинено втечу) from a centre, save in the circumstances defined in the Police Act (to arrest a person who had committed a serious offence, to protect the life and health of the officer or others, in case of armed resistance, and so forth).51. Section 5(9) provided that food was normally to be served in the canteen at times set in the centre’s schedule, in the presence of guards.52. Section 6 regulated procedures for the residents’ “release” (звільнення) from the centres.53. Section 7(3)(1) provided that the centre’s director could impose the following sanctions on the residents for failure to observe the centre’s rules: (i) warning and (ii) reprimand.54. Section 7(7)(1) required the centre’s management to put in place a time schedule for the centre, including the mealtimes, sleep period, visiting times, and so forth.RELEVANT INTERNATIONAL MATERIALAgreement between the Cabinet of Ministers of Ukraine and the Government of the Russian Federation on Readmission 200655. The Agreement was ratified by Ukraine on 23 September 2008[2] and was in force at the material time. Article 4 of the Agreement required the requested State to readmit third‑country nationals if they illegally entered the territory of the requesting State directly from the territory of the requested State.European Committee for the Prevention of Torture and Inhuman or Degrading Treatment or Punishment56. European Committee for the Prevention of Torture and Inhuman or Degrading Treatment or Punishment (hereinafter “the CPT”) in the report on its 2009 visit to Ukraine (CPT/Inf (2011) 29, Section: 11/53), published on 23 November 2011, examined conditions in the temporary accommodation centres:“B. Foreign nationals detained under aliens legislation / Preliminary remarks 47. It should be recalled that the State Border Service operates two types of facilities for the detention of foreign nationals: Specially equipped premises (SP), intended for stays of up to 3 days, and Temporary detention facilities (PTT), intended for stays of up to 10 days. Further, the Ministry of Internal Affairs runs Temporary accommodation centres (PTPs) designed for the detention of foreign nationals [for longer periods]. Two new PTPs entered into service in Rozsudiv (Chernigiv region) in July 2008 and in Zhuravichi (Volyn’ region) in September 2008......4. Conditions of detention / a. Internal Affairs Temporary accommodation centre (PTP) in Rozsudiv60. With an official capacity of 235 places, at the time of the visit, Rozsudiv PTP was holding 92 foreign nationals, including five women and three children aged from 3 to 20 months. Detained foreign nationals were being held in five separate sections, one of which was accommodating the women and children.61. The delegation was impressed by the material conditions offered to detained foreign nationals. The bedrooms, which were designed to hold from three to eight persons and measured from 16 to 34 m², were well lit and ventilated, adequately equipped (with beds, table, chairs and wardrobes) and clean ...”Office of the United Nations High Commissioner for Refugees57. Ukraine as a Country of Asylum publication, 2013“Legislation35. According to Ukrainian law, a person who is in the country without a legal basis for stay is guilty of an administrative violation [Code of Administrative Offences, Art. 203]. Similarly, an individual who crosses or attempts to cross a state border irregularly is guilty of an administrative violation [Code of Administrative Offences, Art. 204(1).]... Persons who have committed administrative violations relating to the legality of their stay or illegal crossing of the state border are subject to forcible return or forcible expulsion from Ukraine if they cannot prove they have a legal basis for stay in Ukraine [Law On the legal status of foreigners and stateless persons, Art. 26(1) [on forcible return] and Art. 30 [on forcible expulsion]. The difference between forcible return and forcible expulsion is as follows: The decision on forcible return is made by an administrative body (SMS, SBGS, Security Service) and the individual is given up to 30 days to leave the country by his/her own means. The decision on forcible expulsion is taken by an administrative court, and the individual is detained pending his/her expulsion.]. Pending their forcible expulsion, they can be detained for up to twelve months in a Migrant Custody Centre (MCC) [In many English-language publications, these facilities are referred to as Migrant Accommodation Centres”(MACs), but this euphemistic translation gives the mistaken impression that these are open facilities that provide shelter. In fact, they are closed administrative detention facilities]....Conditions of Detention43. There are currently two MCCs in Ukraine—located in remote rural areas of the Volyn and Chernihiv regions; they have a combined capacity of 373 persons. Through early 2013, the conditions at the MCCs were monitored regularly through an observatory mechanism organized by the International Organization for Migration with participation of civil society and on occasion foreign embassies. This mechanism led to various improvements, such as in the quantity and quality of food provided in the MCCs. While different gaps continue to be noted in the context of monitoring visits—such as limitations on showering and use of telephones—the authorities have shown some readiness to address these gaps. This is a welcome improvement from 2007 when the Committee Against Torture noted “with concern the poor and overcrowded conditions of detention for asylum-seekers.”THE LAWJOINDER OF THE APPLICATIONS58. Having regard to the similar subject matter of the applications, the Court finds it appropriate to examine them jointly in a single judgment.ALLEGED VIOLATIONS OF ARTICLE 5 § 1 OF THE CONVENTION59. The applicants complained that there had been a number of violations of Article 5 § 1 of the Convention in respect of their arrest and placement at the temporary accommodation centres, namely:(i)  the second to ninth applicants complained that their arrest and detention on 23 December 2011 and on 30 January 2012, prior to the issuance by the domestic court of detention orders in their respect, had been unlawful and(ii)  all applicants also complained that their detention in temporary accommodation centres under the orders issued by the domestic court in their respect on 23 December 2011 and 30 January 2012 had not complied with the requirements of Article 5 § 1 of the Convention, notably on account of the absence of expulsion decisions in their respect, on account of the alleged impossibility to expel them to Somalia (because they had lacked identity documents, because there had been no established authorities in Somalia and, in any event, no cooperation between any such authorities and the Ukrainian authorities) and on account of the alleged failure to pursue the proceedings for their expulsion with requisite diligence.Article 5 § 1 of the Convention reads, in so far as relevant:“1. Everyone has the right to liberty and security of person. No one shall be deprived of his liberty save in the following cases and in accordance with a procedure prescribed by law:...(f)  the lawful arrest or detention of a person to prevent his effecting an unauthorised entry into the country or of a person against whom action is being taken with a view to deportation or extradition.”The parties’ submissionsApplicability of Article 560. The Government submitted that placement in the temporary accommodation centres did not constitute “deprivation of liberty” within the meaning of Article 5 of the Convention.61. They referred to the rules applicable to the centres according to which individuals placed there were free to move around within the territory of the centre and to leave the centre with the management’s permission and move freely within the territory of the relevant administrative entity. The only sanction for breaching the rules governing the centres was a warning or reprimand (see paragraphs 47 and 53 above). Thus the applicants had been free to pursue their social life within and outside of the centres.62. While domestic law used the word “detention” in respect of the applicants’ stay in the centres, the terminology used should not be decisive for the Court (citing Engel and Others v. the Netherlands, 8 June 1976, § 61, Series A no. 22).63. The applicants had been present in Ukraine in flagrant violation of the relevant rules, and had had no identity documents or registered residence. Therefore, the stay at the centres had been a necessary precaution on the part of the State as a measure of control of migration.64. The applicants disagreed. They pointed out that centres’ residents had been separated by gender, had lived in dormitories and had had no private space. There had been a set schedule and routine, including set mealtimes, which residents had had to observe. Leaving a centre had required permission, the issuance of which had been subject to the management’s goodwill.Substance of complaints(a)   First applicant65. In his application form the first applicant submitted that his detention under the court order of 23 December 2011 had been contrary to Article 5 § 1 in that, contrary to the requirements of the domestic law, his detention had been ordered in the absence of an expulsion decision in his regard, there had been no realistic prospect of expulsion to Somalia and the proceedings for his expulsion had not been pursued with the requisite diligence.66. The first applicant failed to submit his observations in reply to those of the Government within the prescribed time-limit.(b)   Second to ninth applicants67. The applicants submitted that their return to Somalia had not been possible because of the situation there. Return to Russia had not been possible because there was no evidence that they had entered Ukraine from that State. In that connection conditions for readmission had not been met. Despite this, the authorities had immediately applied to them the strictest form of restriction, deprivation of liberty.68. The proper procedure would have been to first inform a foreigner present in Ukraine of the illegality of their situation, impose a sanction for any administrative offences committed, issue an expulsion decision and only if there was a failure to comply with such a decision should detention be ordered. This lawful procedure had not been observed. The applicants had been arrested in the morning of 23 December 2011 and 30 January 2012 (see paragraph 6 above) but their arrest had not been recorded in arrest reports until the court decisions. There had been no expulsion decisions in the applicants’ respect even though, the applicants argued, the existence of an expulsion decision was a prerequisite for detention of migrants in irregular situation under domestic law.69. The authorities had had to have been aware from the outset that the Embassy of Somalia in Moscow would not cooperate in providing travel documents for them. This had to be evident for the authorities based on their prior experience with efforts to expel Somalis: many irregular migrants from Somalia had been arrested in Ukraine in 2010 to 2012 but no deportations had taken place.(c)   The Government70. The authorities had demonstrated the requisite diligence in their efforts to organise the applicants’ expulsion. They had requested that the Embassy of Somalia in Moscow provide them with travel documents. Owing to the lack of cooperation from the Embassy, the applicants’ expulsion had proved impossible and they had been released. Their detention had complied with Article 5 § 1 (f) of the Convention.71. As regards the second to ninth applicants the Government also submitted that Article 263 of the Code of Administrative Offences (see paragraph 28 above) permitted detention of foreigners in the applicants’ situation, that is to say who had illegally crossed the border and had had no identity papers, for up to three days.The Court’s assessmentRelevant general principles(a)   Applicability of Article 572. The Court reiterates that, in proclaiming the right to liberty, the first paragraph of Article 5 is concerned with a person’s physical liberty and its aim is to ensure that no one should be dispossessed of such liberty in an arbitrary fashion (see Khlaifia and Others v. Italy [GC], no. 16483/12, § 64, 15 December 2016). In order to determine whether someone has been “deprived of his liberty” within the meaning of Article 5, the starting-point must be his or her specific situation in reality and account must be taken of a whole range of factors such as the type, duration, effects and manner of implementation of the measure in question. The difference between deprivation and restriction of liberty is one of degree or intensity, and not one of nature or substance (see Ilias and Ahmed v. Hungary [GC], no. 47287/15, § 212, 21 November 2019).73. The notion of deprivation of liberty within the meaning of Article 5 § 1 contains both an objective element of a person’s confinement in a particular restricted space for a not negligible length of time, and an additional subjective element in that the person has not validly consented to the confinement in question (see Storck v. Germany, no. 61603/00, § 74, ECHR 2005‑V, and Stanev v. Bulgaria [GC], no. 36760/06, § 117, ECHR 2012).74. Relevant objective factors to be considered include the possibility to leave the restricted area, the degree of supervision and control over the person’s movements, the extent of isolation and the availability of social contacts (see Guzzardi v. Italy, 6 November 1980, § 95, Series A no. 39; H.M. v. Switzerland, no. 39187/98, § 45, ECHR 2002‑II, § 45; H.L. v. the United Kingdom, no. 45508/99, § 91, ECHR 2004‑IX; and Storck, cited above, § 73).75. In determining the distinction between a restriction on liberty of movement and deprivation of liberty in the context of confinement of foreigners in airport transit zones and reception centres for the identification and registration of migrants, the factors taken into consideration by the Court may be summarised as follows: (i) the applicants’ individual situation and their choices, (ii) the applicable legal regime of the respective country and its purpose, (iii) the relevant duration, especially in the light of the purpose and the procedural protection enjoyed by applicants pending the events, and (iv) the nature and degree of the actual restrictions imposed on or experienced by the applicants (see Ilias and Ahmed, cited above, § 217).(b)   General requirements of lawfulness under Article 576. It is one of the key requirements of Article 5 of the Convention that any deprivation of liberty must be “lawful”. Where the “lawfulness” of detention is in issue, including the question of whether “a procedure prescribed by law” has been followed, the Convention refers essentially to national law and lays down the obligation to conform to the substantive and procedural rules of that law, but it requires in addition that any deprivation of liberty should be in keeping with the purpose of Article 5, namely to protect the individual from arbitrariness. In laying down that any deprivation of liberty must be effected “in accordance with a procedure prescribed by law”, Article 5 § 1 primarily requires any arrest or detention to have a legal basis in domestic law. However, these words do not merely refer back to domestic law. They also relate to the quality of the law, requiring it to be compatible with the rule of law, a concept inherent in all Articles of the Convention (see Khlaifia and Others, cited above, § 91).77. While it is normally in the first place for the national authorities, notably the courts, to interpret and apply domestic law, the position is different in relation to cases where failure to comply with such law entails a breach of the Convention. In cases where Article 5 § 1 of the Convention is at stake, the Court must exercise a certain power to review whether national law has been observed (see, for example, Creangă v. Romania [GC], no. 29226/03, § 101, 23 February 2012).78. The absence of a record of such matters as the date, time and location of detention, the name of the detainee, the reasons for the detention and the name of the person effecting it must be seen as incompatible, inter alia, with the very purpose of Article 5 of the Convention (see Kurt v. Turkey, 25 May 1998, § 125, Reports of Judgments and Decisions 1998‑III). It is also incompatible with the requirement of lawfulness under the Convention (see Anguelova v. Bulgaria, no. 38361/97, § 154, ECHR 2002‑IV). These considerations apply with equal force in cases of detention under Article 5 § 1 (f) of the Convention (see, for example, Shchebet v. Russia, no. 16074/07, § 63, 12 June 2008).(c)   Requirements of Article 5 § 1 (f)79. Article 5 enshrines a fundamental human right, namely the protection of the individual against arbitrary interference by the State with his or her right to liberty. Sub-paragraphs (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 (see Khlaifia and Others, cited above, § 88). One of the exceptions, contained in subparagraph (f), permits the State to detain aliens “to prevent [their] effecting an unauthorised entry into the country” or “against whom action is being taken with a view to deportation”.80. As regards the first limb of Article 5 § 1 (f), the Court has held in Saadi v. the United Kingdom ([GC], no. 13229/03, ECHR 2008) as follows:“65. [... T]he Grand Chamber agrees... that, until a State has “authorised” entry to the country, any entry is “unauthorised” and the detention of a person who wishes to effect entry and who needs but does not yet have authorisation to do so can be, without any distortion of language, to “prevent his effecting an unauthorised entry”. It does not accept that as soon as an asylum-seeker has surrendered himself to the immigration authorities, he is seeking to effect an “authorised” entry, with the result that detention cannot be justified under the first limb of Article 5 § 1 (f). To interpret the first limb of Article 5 § 1 (f) as permitting detention only of a person who is shown to be trying to evade entry restrictions would be to place too narrow a construction on the terms of the provision and on the power of the State to exercise its undeniable right of control referred to above...66. While holding, however, that the first limb of Article 5 § 1 (f) permits the detention of an asylum-seeker or other immigrant prior to the State’s grant of authorisation to enter, the Court emphasises that such detention must be compatible with the overall purpose of Article 5, which is to safeguard the right to liberty and ensure that no one should be dispossessed of his or her liberty in an arbitrary fashion....74. To avoid being branded as arbitrary, therefore, such detention must be carried out in good faith; it must be closely connected to the purpose of preventing unauthorised entry of the person to the country; the place and conditions of detention should be appropriate, bearing in mind that “the measure is applicable not to those who have committed criminal offences but to aliens who, often fearing for their lives, have fled from their own country”... and the length of the detention should not exceed that reasonably required for the purpose pursued.”81. As to the second limb of Article 5 § 1 (f), it 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, all that is required under this provision is that "action is being taken with a view to deportation" (see Chahal v. the United Kingdom, 15 November 1996, § 112, Reports of Judgments and Decisions 1996‑V). However, 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) (ibid., § 113).Application of the above principles to the present case(a)   Admissibility(i)  Applicability of Article 582. The applicants alleged and the Government did not deny that from the moment of the applicants’ arrest on the morning of 23 December 2011 and 30 January 2012 until their placement in the centres for temporary accommodation for aliens in irregular situation the applicants were deprived of their liberty within the meaning of Article 5 of the Convention. The Court sees no reason to find otherwise. It remains to be determined whether the applicants’ holding in those centres also constituted such a deprivation of liberty.83. In previous cases the Court has already considered placement of foreign nationals in irregular situations, including those awaiting expulsion, in closed-type facilities to be “deprivation of liberty” (see, for example, Khlaifia and Others, cited above, §§ 65-73, and J.R. and Others v. Greece, no. 22696/16, § 83-87, 25 January 2018).84. The Court considers that the same is true in the present case for the following reasons.85. As far as the applicants’ individual situation, their choices and the subjective element of the situation are concerned, it has not been suggested that the applicants entered the centres of their own initiative or ever consented to their placement there (contrast Ilias and Ahmed, cited above, §§ 220-23).86. As for the objective element of the situation, notably the applicable legal regime and its purpose, the centres are closed facilities with fences and controls imposed on entry and leaving. Under the relevant regulations, the guards at the centres were, at the relevant time, police officers. They have for their mission to prevent the residents from leaving without authorisation (see paragraphs 44, 49 and 50 above). Individuals placed there are not free to leave without the centre’s management’s written permission. Contrary to what is suggested by the Government, the fact that centre residents can leave the centre with permission is not, in itself, a feature which excludes characterisation of an institution as a place of deprivation of liberty. For example, in Stanev v. Bulgaria (cited above, §§ 124-32) the Court considered that the applicant had been “deprived of his liberty” in a facility for persons with mental disorders even though he had been able to leave that facility with permission and had actually been granted leave to do so on three occasions.87. It appears that in the present case, as in Stanev (cited above, § 125), the centre management’s authority to give permission to leave the centre for a period of time was entirely discretionary.88. It is also relevant, while not in itself decisive, that the CPT and the UNHCR both unquestioningly considered these centres places of detention (see paragraphs 56 and 57 above, and compare Khlaifia and Others, cited above, § 66).89. Lastly, while domestic classification of a certain measure is not decisive for the Court’s own assessment of whether it qualifies as a “deprivation of liberty” (see Khlaifia and Others, § 71, and Creangă, § 92, both cited above), the language used in the domestic law and by domestic authorities in respect of placement in the centres is still of relevance.90. Domestic law and the reports drawn up in respect of the applicants (see paragraphs 31 and 46 above), used the term “arrest” (затримання, sometimes also translated as “apprehension”) to describe the placement of individuals in such centres, the same term used, for instance, in the Code of Criminal Procedure for taking criminal suspects into custody (see the relevant provisions of the 1960 Code of Criminal Procedure in Korniychuk v. Ukraine, no. 10042/11, § 41, 30 January 2018, and Doronin v. Ukraine, no. 16505/02, §§ 49 and 54, 19 February 2009).91. As to the nature and degree of the actual restrictions imposed on the applicants, the Court has already found it established above that the applicants were not free to leave the centres. This was so even if they wished to return to Russia and had the right to be admitted there. Travelling to Russia would require them to seek permission to leave the centre and/or being accompanied to the Russian border (see Z.A. and Others v. Russia [GC], no. 61411/15 and 3 others, § 154, 21 November 2019, and contrast Ilias and Ahmed, cited above, § 241). Moreover, as pointed out by the applicants, regulations applicable in the centres made it clear that various aspects of the residents’ lives there were subject to close supervision (see paragraphs 46 to 54 above).92. Having regard to the above considerations, the Court finds that the applicants were deprived of their liberty during all relevant periods, and, therefore, Article 5 of the Convention is applicable.(ii)  Detention in the absence of expulsion decisions: December and January Group applicants93. A distinction must be drawn between the applicants of the December and January Groups concerning their complaint that their detention was unlawful because there were no expulsion decisions in their respect. The December Group applicants were detained under section 32 of the Aliens Act 1994, which did not require an expulsion decision to have already been issued before detention of a foreign national in an irregular situation could be ordered (see paragraphs 9 and 36 above).94. Therefore, the first and the sixth to ninth applicants’ complaints in this connection are manifestly ill-founded and should be rejected pursuant to Article 35 §§ 3 (a) and 4 of the Convention.95. By contrast, as far as the January Group applicants are concerned, they were detained under the Aliens Act 2011 which contained different rules on this point (see paragraphs 9, 38 and 40 above and see also a discussion of those provisions in paragraphs 107 to 113 below). Their complaints in this connection cannot be considered manifestly ill-founded.(iii)  The first and eighth applicants’ detention under the domestic court’s detention orders of 23 December 201196.

Article of the Convention at issue: Article 5
Outcome: violation