64It follows that, where a court is called upon, within the exercise of its jurisdiction, to order, on the basis of a piece of legislation of a Member State implementing Article 18 of Directive 2008/115, that the detention of a third-country national for the purpose of removal be carried out in a prison facility or that the detention of that third-country national in such a facility be extended, that court must be in a position to ensure that its decision is preceded by an examination of the compatibility of such legislation with EU law and, therefore, to review whether that piece of legislation is consistent with what is permissible under that provision (see, by analogy, judgment of 28 January 2021, Spetsializirana prokuratura (Letter of rights), C‑649/19, EU:C:2021:75, paragraph 74 and the case-law cited).
Source: EUR-Lex, © European Union, 1998-2026. Reuse authorised under Decision 2011/833/EU.