Therefore, a return decision may, in principle, be adopted against the person concerned after the decision rejecting the application for international protection or aggregated together with that rejection in a single administrative act (see, to that effect, judgment of 19 June 2018, Gnandi, C‑181/16 , EU:C:2018:465 , paragraph 59 ).

It is true that the Court has held, in paragraphs 47 and 49 of the judgment of 30 May 2013, Arslan ( C‑534/11 , EU:C:2013:343 ), that an authorisation to remain on the territory for the purposes of effectively exercising a right of appeal against a decision rejecting an application for international protection precludes the application of Directive 2008/115 to the third-country national who submitted that application until resolution of the appeal against that rejection decision (judgment of 19 June 2018, Gnandi, C‑181/16 , EU:C:2018:465 , paragraph 43 ). However, it cannot be inferred from that judgment that such an authorisation to remain precludes the conclusion that, as soon as the application for international protection is rejected, and without prejudice to the existence of a right to stay or residence permit, the stay of the person concerned becomes illegal, within the meaning of Directive 2008/115. On the contrary, unless that person has been granted a right to stay or a residence permit as referred to in Article 6(4) of Directive 2008/115, a third-country national is staying illegally, within the meaning of Directive 2008/115, as soon as his application for international protection is rejected at first instance by the determining authority, irrespective of the existence of an authorisation to remain pending the outcome of an appeal against that rejection (judgment of 19 June 2018, Gnandi, C‑181/16 , EU:C:2018:465 , paragraphs 44 and 59 ).

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 and Directive 2013/32/EU of the European Parliament and of the Council of 26 June 2013 on common procedures for granting and withdrawing international protection must be interpreted as precluding a third-country national whose application for international protection is rejected as manifestly unfounded at first instance by the competent administrative authority, from being detained with a view to his removal, where, in accordance with Article 46(6) and (8) of Directive 2013/32, he is lawfully authorised to remain on that territory until a decision has been made on his action relating to the right to remain on that territory pending the resolution of the appeal brought against the decision which rejected his application for international protection.

In that regard, the right to an effective judicial remedy means that all the legal effects of the return decision are suspended, which has the result, in particular, that the person concerned cannot be detained with a view to removal pursuant to Article 15 of Directive 2008/115 as he is authorised to remain on the territory of the Member State in question (see, to that effect, judgment of 19 June 2018, Gnandi, C‑181/16, EU:C:2018:465, paragraph 62). The same applies to a third-country national whose application for international protection is rejected as manifestly unfounded, in accordance with Article 32(2) of Directive 2013/32.

It is true that it follows from Article 46(5) and (6) of Directive 2013/32 that, in that case, the person concerned does not enjoy, by operation of law, a right to remain on the territory of the Member State in question pending the resolution of his appeal. However, in accordance with the requirements of the last sentence of Article 46(6) of that directive, the person concerned must be able to take recourse to the courts, which will decide whether he may remain on that territory until judgment has been given on his appeal. Article 46(8) of that directive provides that, pending the outcome of action seeking resolution of whether or not the applicant may remain, the Member State in question must grant that person authorisation to remain on its territory.

It follows from all the foregoing that a third-country national whose application for international protection has been rejected as manifestly unfounded cannot be detained pursuant to Article 15 of Directive 2008/115 during the period prescribed for bringing an appeal against that rejection. If such an appeal is brought, the person concerned also cannot be detained on the basis of that article while he is authorised to remain in the territory of the Member State in question, in accordance with Article 46(8) of Directive 2013/32.

(see paras 51-55, operative part)