State for implementing the transfer of an asylum seeker to the Member State which is obliged to readmit him, the maximum periods laid down in Article 15(5) and (6) of Directive 2008/115 serve the purpose of limiting the deprivation of a person’s liberty. Moreover, the latter periods set a limit to the duration of detention for the purpose of removal, not to the implementation of the removal procedure as such. 57 Consequently, the answer to Question 2 is that Article 15(5) and (6) of Directive 2008/115 must be interpreted as meaning that the period during which execution of the decree of deportation was suspended because of a judicial review procedure brought against that decree by the person concerned is to be taken into account in calculating the period of detention for the purpose of removal, where the person concerned continued to be held in a detention facility during that procedure. Question 3 58 By this question the referring court seeks clarification, in the light of the facts of the case in the main proceedings, of the meaning of Article 15(4) of Directive 2008/115, in particular of the concept of a ‘reasonable prospect of removal’. Question 3(c) 59 By Question 3(c) the referring court asks whether Article 15(4) of Directive 2008/115 is to be interpreted as meaning that there is no reasonable prospect of removal where the possibilities of extending the periods of detention provided for in Article 15(6) have been exhausted, in the situation where no agreement for readmission has been reached with the third country at the time when a judicial review of the detention of the person concerned is conducted. 60 It is clear that, where the maximum duration of detention provided for in Article 15(6) of Directive 2008/115 has been reached, the question whether there is no longer a ‘reasonable prospect of removal’ within the meaning of Article 15(4) does not arise. In such a case the person concerned must in any event be released immediately. 61 Article 15(4) of Directive 2008/115 can thus only apply if the maximum periods of detention laid down in Article 15(5) and (6) of the directive have not expired. 62 Consequently, the answer to Question 3(c) is that Article 15(4) of Directive 2008/115 must be interpreted as not being applicable where the possibilities of extending the periods of detention provided for in Article 15(6) of Directive 2008/115 have been exhausted at the time when a judicial review of the detention of the person concerned is conducted. Questions 3(a) and (b) 63 As regards Questions 3(a) and (b), it should be pointed out that, under Article 15(4) of Directive 2008/115, detention ceases to be justified and the person concerned must be released immediately when it appears that, for legal or other considerations, a reasonable prospect of removal no longer exists. 64 As is apparent from Article 15(1) and (5) of Directive 2008/115, the detention of a person for the purpose of removal may only be maintained as long as the removal

Select target paragraph3