gives the following Judgment 1 This reference for a preliminary ruling concerns the interpretation of Article 15(4) to (6) of Directive 2008/115/EC of the European Parliament and of the Council of 16 December 2008 on common standards and procedures in Member States for returning illegally staying third-country nationals (OJ 2008 L 348, p. 98). 2 The reference was made in the course of administrative proceedings brought on the initiative of the director of the Direktsia ‘Migratsia’ pri Ministerstvo na vatreshnite raboti (Directorate for Migration at the Ministry of the Interior) requesting the Administrativen sad Sofia-grad (Sofia City Administrative Court) to rule of its own motion on the continued detention of Mr Kadzoev (Huchbarov) at that directorate’s special detention facility for foreign nationals (‘the detention centre’) in Busmantsi in the district of Sofia. Legal context Community legislation 3 Directive 2008/115 was adopted on the basis in particular of Article 63(3)(b) EC. According to recital 9 in the preamble to the directive: ‘In accordance with Council Directive 2005/85/EC of 1 December 2005 on minimum standards on procedures in Member States for granting and withdrawing refugee status [OJ 2005 L 326, p. 13], a third-country national who has applied for asylum in a Member State should not be regarded as staying illegally on the territory of that Member State until a negative decision on the application, or a decision ending his or her right of stay as asylum seeker has entered into force.’ 4 Article 15 of Directive 2008/115, which forms part of the chapter on detention for the purpose of removal, reads as follows: ‘1. Unless other sufficient but less coercive measures can be applied effectively in a specific case, Member States may only keep in detention a third-country national who is the subject of return procedures in order to prepare the return and/or carry out the removal process, in particular when: (a) there is a risk of absconding or (b) the third-country national concerned avoids or hampers the preparation of return or the removal process. Any detention shall be for as short a period as possible and only maintained as long as removal arrangements are in progress and executed with due diligence. 2. Detention shall be ordered by administrative or judicial authorities. Detention shall be ordered in writing with reasons being given in fact and in law.

Select target paragraph3