Language of document : ECLI:EU:C:2023:909

OPINION OF ADVOCATE GENERAL

RICHARD DE LA TOUR

delivered on 23 November 2023 (1)

Case C420/22

NW

v

Országos Idegenrendézeti Főigazgatóság,

Miniszterelnöki Kabinetirodát vezető miniszter

and

Case C528/22

PQ

v

Országos Idegenrendézeti Főigazgatóság,

Miniszterelnöki Kabinetirodát vezető miniszter

(Requests for a preliminary ruling from the Szegedi Törvényszék (Szeged High Court, Hungary))

(Reference for a preliminary ruling – Area of freedom, security and justice – Border controls, asylum and immigration – Directive 2003/109/EC – Status of third-country nationals who are long-term residents – Withdrawal of such status – Article 20 TFEU – Citizenship of the European Union – EU citizen who has never exercised the right to freedom of movement – Residence of a family member – Withdrawal or refusal of a right of residence – Danger to national security – Opinion of a specialised authority – Classified information – Statement of reasons – Access to the file)






I.      Introduction

1.        These requests for a preliminary ruling concern the interpretation of Article 20 TFEU, as well as Article 9(3) and Article 10(1) of Council Directive 2003/109/EC of 25 November 2003 concerning the status of third-country nationals who are long-term residents. (2)

2.        The requests were made in proceedings between NW (Case C‑420/22) and PQ (Case C‑528/22), who are both third-country nationals, and the Országos Idegenrendészeti Főigazgatóság (National Directorate-General for the Immigration Police, Hungary) (‘the Directorate-General’).

3.        The disputes concern, in Case C‑420/22, the withdrawal of NW’s permanent residence card and the obligation to leave Hungarian territory, and in Case C‑528/22, the rejection of PQ’s application for a national settlement permit.

4.        The questions put by the Szegedi Törvényszék (Szeged High Court, Hungary) in those two cases ask the Court to specify the material and procedural conditions that Member States must comply with to be able to derogate from the derived right of residence flowing from Article 20 TFEU.

5.        In this Opinion, I will explain – following on from the recent judgment of the Court of Justice, in the matter of international protection, of 22 September 2022, Országos Idegenrendészeti Főigazgatóság and Others (3) – why I consider that Article 20 TFEU, in the light of Articles 41 and 47 of the Charter of Fundamental Rights of the European Union, (4) must be interpreted as precluding national legislation with the following characteristics: (i) the decisive intervention of a specialised national security authority which is separate from the authority responsible for matters of residence; (ii) the binding nature for the latter authority of the opinion issued by the specialised authority; (iii) the absence of a statement of reasons for both that opinion and the decision to withdraw or refuse a right of residence; (iv) the failure to notify the person concerned of the essence of the grounds on which that decision is based; and (v) the failure to take into account all the relevant individual circumstances.

II.    Hungarian law

6.        Paragraph 94 of a szabad mozgás és tartózkodás jogával rendelkező személyek beutazásáról és tartózkodásáról szóló 2007. évi I. törvény (Law No I of 2007 on the Admission and Residence of Persons with the Right of Free Movement and Residence) (5) of 5 January 2007 (‘Law I’) reads as follows:

‘1.      In proceedings regarding the third-country family members of Hungarian citizens, the provisions of [a harmadik országbeli állampolgárok beutazásáról és tartózkodásáról szóló 2007. évi II. törvény (Law No II of 2007 on the Admission and Residence of Third-Country Nationals) (6) of 5 January 2007 (“Law II”),] shall apply to proceedings opened and reopened after the date of entry into force of [az egyes migrációs tárgyú és kapcsolódó törvények módosításáról szóló 2018. évi CXXXIII. törvény (Law No CXXXIII of 2018 on the Amendment of Certain Laws Relating to Migration and Other Related Laws) (7) of 12 December 2018 (“the second amending law”)].

2.      Any third-country national holding a valid residence card or permanent residence card at the time of entry into force of the second amending law, issued to him or her as a family member of a Hungarian citizen before the date of entry into force of the second amending law, shall be issued, upon request made before the expiry of the residence card or permanent residence card, a national settlement permit without verification of compliance with the conditions set out in Paragraph 33(1)(a) and (b) and in Paragraph 35(1) and (1a) of [Law II], except if:

(c)      a ground for exclusion provided for in subparagraphs 1(c) and 2 of Paragraph 33 of [Law II] precludes his or her settlement.

3.      With regard to subparagraph 2(c), designated specialist State authorities shall be requested to provide an official assessment in accordance with the relevant provisions of [Law II] on granting settlement permits.

4.      Where a third-country family member of a Hungarian citizen has a valid residence card or permanent residence card, that card shall be revoked:

(b)      if the third-country national’s residence constitutes a threat to public order, public security or national security in Hungary.

5.      For each special case referred to in subparagraph 4(b), the designated specialist State authorities shall be requested to provide an official assessment in accordance with the relevant provisions of [Law II] on granting settlement permits.

…’

7.        Paragraph 33(2)(b) of Law II provides:

‘No interim settlement permit, national settlement permit or EC settlement permit shall be issued to a third-country national:

(b)      whose settlement in Hungary constitutes a threat to public security or national security.’

8.        Under Paragraph 87/B(4) of that law:

‘The opinion of the specialised State authority is, with regard to special cases, binding for the immigration authority concerned.’

9.        Paragraph 97(1) of a harmadik országbeli állampolgárok beutazásáról és tartózkodásáról szóló 2007. évi II. törvény végrehajtásáról szóló 114/2007 rendelet (Decree on the implementation of [Law II]) (8) of 5 January 2007 states:

‘In proceedings for the issue or withdrawal of the interim settlement permits, national settlement permits and EC settlement permits of third-country nationals, and also in proceedings for the withdrawal of settlement permits and/or immigration permits of third-country nationals, in order to determine as to whether the settlement or immigration of a third-country national constitutes a threat to the national security of Hungary, the Government shall appoint the Alkotmányvédelmi Hivatal (Constitutional Protection Office, Hungary) and the Terrorelhárítási Központ (Counter-Terrorism Centre, Hungary)] to function as specialist authorities in the first instance, and the minister in charge of supervising the national security services in the second instance.’

10.      Paragraph 11 of a minősített adat védelméről szóló 2009. évi CLV. törvényny (Law No CLV of 2009 on the protection of classified information) (9) of 29 December 2009 provides:

‘1.      Data subjects shall be entitled to have access to their personal data classified as national classified information on the basis of an access authorisation issued by the classifying authority …

2.      … The classifying authority shall refuse the access authorisation if access to the information harms the public interest on which the classification is based. The classifying authority shall state reasons for refusing the access authorisation.

3.      Where the access authorisation is refused, the data subject may challenge that decision by seeking an administrative judicial review. If the court upholds the appeal, it shall order the classifying authority to grant the access authorisation. … Neither the applicant, nor any person participating as an interested party together with the applicant nor their representatives shall have access to the classified information during the proceedings …’

11.      Paragraph 12 of that law is worded as follows:

‘1.      The authority processing classified information may deny the data subject the right to access his or her personal data if the public interest on which the classification is based would be compromised by exercise of that right.

2.      Where the rights of a data subject are relied upon before a court, the provisions of Paragraph 11(3) shall apply mutatis mutandis to the court hearing the matter and to access to the classified information.’

12.      Under Paragraph 13(1) and (5) of that law:

‘1.      Classified information may be used only by a person who has good reason to do so in the interests of performing a State or public function and who, without prejudice to the exceptions laid down by the law, has:

(a)      valid personal security clearance corresponding to the level of classification of the information that that person wishes to use;

(b)      a confidentiality declaration; and

(c)      a user authorisation.

5.      Unless the law provides otherwise, the court may exercise the decision-making powers necessary to determine the matters brought before it in the order in which those matters are allocated, with no requirement for a national security check, personal security clearance, confidentiality declaration or user authorisation.’

13.      Paragraph 14(4) of the same act provides:

‘The classifying authority may authorise access to national classified information in the context of an administrative procedure, judicial proceedings (except for criminal proceedings), summary offence proceedings or other official proceedings. Authorisation to use national classified information may not be refused in the context of judicial review proceedings by the public prosecution service or in civil judicial proceedings brought by the public prosecution service in the public interest.’

III. The facts of the disputes in the main proceedings and the questions referred for a preliminary ruling

A.      Case C420/22

14.      NW, a Turkish national, married a Hungarian national in 2004. In 2005 they had a child, who has Hungarian nationality.

15.      After residing lawfully in Hungary for more than five years, NW, taking into account the status of his wife and child, submitted an application to the Hungarian authorities for a permanent residence card, which was issued to him and was valid until 31 October 2022.

16.      NW has stable and regular income in Hungary and owns property, which allows him to support himself and his family without recourse to the Hungarian social assistance system.

17.      The referring court has indicated that a relationship of dependency exists between NW and his child.

18.      NW and his wife have joint parental authority over their child and are the child’s primary carers. Without NW’s income, his family would be unable to provide for their needs. NW also has a close emotional bond with his child.

19.      By a non-reasoned opinion of 12 January 2021, the Constitutional Protection Office decided that NW’s residence in Hungary was contrary to the country’s national security interests. That specialised authority stated that the information on which its decision was based constituted ‘classified information’ within the meaning of Law No CLV of 2009 on the protection of classified information, and that therefore neither NW nor the immigration authority could know the content of that information.

20.      By decision of 22 January 2021, the elsőfokú idegenrendészeti hatóság (immigration authority of first instance, Hungary), pursuant to Paragraph 94(4)(b) of Law I, withdrew NW’s permanent residence card and ordered him to leave Hungarian territory.

21.      The Directorate-General confirmed that decision on 10 May 2021, on the ground that the Belügyminiszter (Minister of the Interior, Hungary) had declared, in his opinion delivered on 13 April 2021 as the specialised authority of second instance, that it was contrary to Hungary’s national security interests for NW to remain in the country. In its decision, the Directorate-General pointed out that, pursuant to Paragraph 87/B(4) of Law II, it could not deviate from the opinion issued by the Minister of the Interior and that it was therefore obliged to withdraw NW’s permanent residence card, without taking account of his personal circumstances. The Directorate-General also stated that the withdrawal of the permanent residence card did not prevent NW from applying for a residence permit under Law II, in accordance with the conditions provided for therein. (10)

22.      NW appealed against the Directorate-General’s decision of 10 May 2021 before the Szegedi Törvényszék (Szeged High Court), seeking the annulment of both that decision and the decision of the immigration authority of first instance.

23.      NW complains that the authorities did not examine his personal circumstances, particularly as regards his links to Hungary. The authorities had no knowledge of the detailed reasoning of the specialised authorities and therefore adopted their decision contrary, inter alia, to the principle of proportionality. NW explains that, were he to leave Hungary, his family, and in particular his child whom he is raising with his wife, would be in dire circumstances, given their relationship of dependency.

24.      The referring court notes that the decision to withdraw NW’s permanent residence permit is based solely on binding and non-reasoned opinions of the specialised authorities, which in turn are based on classified information to which neither NW nor the authorities responsible for that decision had access. As a result, no reasons are given for the decision taken by those authorities.

25.      The referring court points out that it is apparent from the case-law of the Kúria (Supreme Court, Hungary) that, in a situation such as that at issue in the main proceedings, the procedural rights of the person concerned are guaranteed by the option available to the court having jurisdiction, with a view to assessing the lawfulness of the decision on residence, to consult the confidential information on which the opinion of the specialist bodies is based.

26.      Pursuant to Hungarian legislation, neither the person concerned nor his or her representative has a specific opportunity to express his or her views on the non-reasoned opinion of those bodies. While they admittedly have the right to submit a request for access to classified information concerning that person in separate proceedings, (11) they cannot, in any case, make use, in the context of the administrative procedures or judicial proceedings, of the classified information to which they have been granted access. The court with which an appeal is lodged against a decision on residence has no power in that regard. Moreover, that court may only make a non-reasoned decision as to whether the opinion of the specialised authorities is sufficient to justify the finding that the person concerned represents a threat to national security.

27.      However, NW falls within the scope of Directive 2003/109 (12) and should, on that basis, be eligible for similar procedural guarantees to those emphasised by the Court of Justice, particularly in its judgment of 4 June 2013, ZZ, (13) in the context of Directive 2004/38/EC. (14)

28.      In those circumstances, the Szegedi Törvényszék (Szeged High Court) decided to stay the proceedings and to refer the following questions to the Court of Justice for a preliminary ruling:

‘(1)      Must Article 10(1) of [Directive 2003/109], in conjunction with Article 47 of the [Charter] – and also, in this specific case, with Articles 7 and 24 of the Charter – be interpreted as meaning that an authority of a Member State which, on grounds of national security and/or public policy or public security, has adopted a decision ordering the withdrawal of a long-term residence permit which had previously been issued to a third-country national, and the specialised authority which has determined that the matter is confidential, must ensure there is a guarantee that in all circumstances the person concerned, who is a third-country national, and his or her legal representative, are entitled to know at least the essence of the confidential or classified information and data underpinning [that] decision which is based on those grounds and to use that information or those data in the proceedings concerning the decision, where the responsible authority considers that such disclosure would be contrary to the interests of national security?

(2)      If the answer is in the affirmative, what precisely must be understood by the ‘essence’ of the confidential grounds on which that decision is based, having regard to Articles 41 and 47 of the Charter?

(3)      Having regard to Article 47 of the Charter, must Article 10(1) of Directive 2003/109 be interpreted as meaning that, where a court of a Member State rules on the legality of the opinion of the specialised authority which is based on grounds relating to confidential or classified information and on the legality of the substantive immigration decision adopted on the basis of that opinion, it must have jurisdiction to examine the legality of the confidentiality (its necessity and proportionality) and, if it considers that the confidentiality is unlawful, to order, of its own motion, that the person concerned and his or her legal representative may know and use all the information on which the opinion and the decision issued by the administrative authorities are based, or alternatively, if it considers that the confidentiality claim is lawful, that the person concerned may know and use at least the essence of the confidential information in the immigration proceedings in which he or she is concerned?

(4)      Must Article 9(3) and Article 10(1) of Directive 2003/109, in conjunction with Articles 7 and 24, Article 51(1) and Article 52(1) of the Charter, be interpreted as precluding legislation of a Member State under which an immigration decision ordering the withdrawal of a long-term residence permit which had previously been issued takes the form of a non-reasoned decision which:

(a)      is based solely on automatic reference to a – likewise non-reasoned – binding and mandatory opinion by the specialised authority which identifies a danger or harm to national security, public policy or public security; and

(b)      has therefore been adopted without an in-depth examination of whether the grounds of national security, public policy or public security exist in the specific case in question, and without taking into account individual circumstances or the requirements of necessity and proportionality?’

29.      On 8 August 2022, the Court of Justice received from the referring court a supplement to its request for a preliminary ruling.

30.      The referring court explained that, in that request, it had relied on the premiss that NW fell within the scope of Directive 2003/109. However, if the Court should find that that was not the case, it would be necessary to determine whether NW is entitled to a derived right of residence under Article 20 TFEU, in so far as there is a relationship of dependency between NW and his minor child.

31.      From that perspective, the referring court considers that the Directorate-General infringed EU law simply by failing to examine whether the applicant fell within the scope of Article 20 TFEU.

32.      Accordingly, the Szegedi Törvényszék (Szegedi High Court) added the following question to the questions already put to the Court of Justice for a preliminary ruling, consisting of three parts:

‘Must Article 20 [TFEU], in conjunction with Articles 7 and 24 of the [Charter], be interpreted as precluding the practice of a Member State of adopting a decision ordering the withdrawal of a residence permit which had previously been issued to a third-country national whose minor child and whose spouse are nationals of a Member State of the European Union and live in that State, without first examining whether the family member concerned, who is a third-country national, is entitled to a derived right of residence pursuant to Article 20 TFEU?

Must Article 20 TFEU, in conjunction with Articles 7 and 24, Article 51(1) and Article 52(1) of the Charter, be interpreted as meaning that, in so far as a derived right of residence is applicable pursuant to Article 20 TFEU, the effect of EU law is that national administrative and judicial authorities must also apply EU law when adopting an immigration decision ordering the withdrawal of a permanent residence permit, and when applying the national security, public policy or public security exceptions on which that decision is based and, where such grounds are established, when examining the necessity and proportionality justifying the limitation of the right of residence?

In the event that the applicant falls within the scope of Article 20 TFEU, the referring court asks the Court of Justice to also answer, in the light of that article, the first to fourth questions referred for a preliminary ruling in the order for reference ….’

33.      Written observations have been submitted by the Hungarian and French Governments and by the European Commission.

B.      Case C528/22

34.      PQ, a Nigerian national, entered Hungary legally in June 2005 as a professional football player and has since resided lawfully in that Member State. He has been living with his Hungarian partner since 2011. They have two children, born in 2012 and 2021, who have Hungarian nationality.

35.      The most recent application for a permanent residence card, which PQ submitted taking into account the status of his eldest child, is dated 23 January 2014. The Hungarian authorities issued him with the card, which was valid until 15 September 2020.

36.      PQ has joint parental authority with his partner over their children. He lives permanently with them and is their primary carer most of the time. His children have a close emotional bond and a relationship of dependency with PQ, who has looked after them constantly since they were born.

37.      In 2012, PQ was the victim of an assault which caused him a serious and permanent disability.

38.      By decision of 27 October 2020, the immigration authority of first instance rejected an application for a national settlement permit which PQ had submitted on 6 August 2020.

39.      By a non-reasoned opinion of 9 September 2020, the Constitutional Protection Office decided that PQ’s stay in Hungary was contrary to the country’s national security interests. That specialised body stated that the information on which that decision was based constituted ‘classified information’ within the meaning of Law No CLV of 2009 on the protection of classified information, and that therefore neither PQ nor the immigration authority could know the content of that information.

40.      On 25 March 2021, the Directorate-General confirmed the decision of the immigration authority of first instance of 27 October 2020, on the ground that the Minister of the Interior had declared, in his opinion delivered on 12 February 2021 as the specialised authority of second instance, that it was contrary to Hungary’s national security interests for PQ to remain. In its decision, the Directorate-General pointed out that, pursuant to Paragraph 87/B(4) of Law II, it could not deviate from the opinion issued by the Minister of the Interior and that it was therefore obliged to reject PQ’s application for a national settlement permit, without taking account of his personal circumstances.

41.      PQ appealed against the Directorate-General’s decision of 25 March 2021 before the Szegedi Törvényszék (Szeged High Court), seeking the annulment of both that decision and the decision of the immigration authority of first instance.

42.      He accuses the authorities of having failed to examine his personal circumstances and of having adopted their decision contrary, inter alia, to the principle of proportionality. Indeed, neither he nor the authorities had knowledge of the detailed reasoning of the specialised authorities. PQ also argues that there is a relationship of dependency between him and his minor children, such that he should be entitled to a derived right of residence under Article 20 TFEU.

43.      The referring court notes that the decision to refuse the national settlement permit is based solely on binding and non-reasoned opinions, which in turn are based on classified information to which neither PQ nor the authorities responsible for that decision had access. No reasons are given for that decision. Moreover, the authorities failed to conduct an in-depth examination of whether PQ’s situation could fall under EU law, in so far as he was entitled to a derived right of residence under Article 20 TFEU.

44.      The referring court observes that it is apparent from the case-law of the Kúria (Supreme Court) that, in a situation such as that at issue in the main proceedings, the procedural rights of the person concerned are guaranteed by the option available to the court having jurisdiction, with a view to assessing the lawfulness of the decision on residence, to consult the classified information on which the opinion of the specialist bodies is based.

45.      Pursuant to Hungarian legislation, neither the person concerned nor his or her representative has a specific opportunity to express his or her views on the non-reasoned opinion of those bodies. While they admittedly have the right to submit a separate request for access to classified information concerning that person, they cannot, in any case, make use, in the context of the administrative procedures or judicial proceedings, of the confidential information to which they have been granted access. The court with which an appeal is lodged against a decision on residence has no power in that regard.

46.      In the present case, the Fővárosi Törvényszék (Budapest High Court, Hungary) also dismissed, on 7 March 2022, the appeals brought by PQ against the refusal of the specialised authorities to allow him to access the classified information concerning him and to use that information in the context of an administrative procedure and judicial proceedings.

47.      According to the referring court, PQ falls within the scope of Article 20 TFEU and should, on that basis, be eligible for similar procedural guarantees to those emphasised by the Court of Justice, particularly in its judgment in ZZ, in the context of Directive 2004/38.

48.      In those circumstances, the Szegedi Törvényszék (Szeged High Court) decided to stay the proceedings and to refer the following questions to the Court of Justice for a preliminary ruling:

‘(1)(a)      Must Article 20 [TFEU], in conjunction with Articles 7 and 24 of the [Charter] be interpreted as meaning that it precludes a practice whereby a Member State adopts a decision ordering the withdrawal of a residence permit which had previously been issued to a third-country national – or refuses an application for an extension of the right of residence (in the present case, an application for a national permanent residence permit) – whose minor child and cohabiting partner are nationals of a Member State of the Union and live in that Member State, without previously examining whether the family member concerned, a third-country national, can benefit from a derived right of residence under Article 20 TFEU?

(b)      Must Article 20 TFEU, in conjunction with Articles 7 and 24, Article 51(1) and Article 52(1) of the Charter, be interpreted as meaning that, where there is a derived right of residence under Article 20 TFEU, EU law requires that national administrative authorities and courts must also apply EU law when adopting an immigration decision concerning an application for extension of the right of residence (in this case an application for a national permanent residence permit) and when they apply the national security, public policy or public security exceptions on which that decision is based and, where it is shown that those grounds exist, when they examine the necessity and proportionality justifying a limitation on the right of residence?

(2)      Must Article 20 TFEU, in conjunction with Article 47 of the Charter – and also, in this specific case, with Articles 7 and 24 of the Charter – be interpreted as meaning that an authority of a Member State which, on grounds of national security and/or public policy or public security, has adopted a decision ordering the withdrawal of a long-term residence permit which had previously been issued – or makes a decision on an application for extension of the right of residence – and the specialised authority which has determined that the matter is confidential, must ensure there is a guarantee that in all circumstances the person concerned, who is a third-country national, and his or her legal representative, are entitled to know at least the essence of the confidential or classified information and data underpinning the decision which is based on those grounds and to use that information or those data in the proceedings concerning the decision, where the competent authority considers that such disclosure would be contrary to the interests of national security?

(3)      If the answer is in the affirmative, what precisely must be understood by the ‘essence’ of the confidential grounds on which that decision is based, having regard to Articles 41 and 47 of the Charter?

(4)      Having regard to Article 47 of the Charter, must Article 20 TFEU be interpreted as meaning that, where a court of a Member State rules on the legality of the opinion of the specialised authority which is based on grounds relating to confidential or classified information and on the legality of the substantive immigration decision adopted on the basis of that opinion, it must have jurisdiction to examine the legality of the confidentiality (its necessity and proportionality) and, if it considers that the confidentiality is unlawful, to order, of its own motion, that the person concerned and his or her legal representative may know and use all the information on which the opinion and the decision issued by the administrative authorities are based, or alternatively, if it considers that the confidentiality claim is lawful, that the person concerned may know and use at least the essence of the confidential information in the immigration proceedings concerning him or her?

(5)      Must Article 20 TFEU, in conjunction with Articles 7 and 24 and Article 51(1) and Article 52(1) of the Charter, be interpreted as precluding legislation of a Member State under which an immigration decision ordering the withdrawal of a long-term residence permit which had previously been issued or ruling on an application for extension of the right of residence, takes the form of a non-reasoned decision which:

(a)      is based solely on automatic reference to a – likewise non-reasoned – binding and mandatory opinion by the specialised authority which identifies a danger or harm to national security, public policy or public security; and

(b)      has therefore been adopted without an in-depth examination of whether the grounds of national security, public policy or public security exist in the specific case in question, and without taking into account individual circumstances or the requirements of necessity and proportionality?’

49.      Written observations have been submitted by PQ, the Hungarian and French Governments and the Commission.

50.      At the joint hearing for the two cases, held on 5 July 2023, PQ, the Hungarian Government, the French Government and the Commission presented oral argument and responded to the questions for oral answer put by the Court.

IV.    Analysis

A.      Preliminary observations on the rule of EU law to be interpreted

51.      In essence, the two cases under consideration raise the same questions, one under Directive 2003/109 (Case C‑420/22) and the other in the context of Article 20 TFEU (Case C‑528/22).

52.      In Case C‑420/22, the Hungarian Government argues that NW was granted a permanent residence card under Hungarian law. This consisted of a residence permit issued independently of EU law and on the basis of more favourable conditions than those provided for by EU law. That residence permit is not to be confused with the long-term resident status provided for by Directive 2003/109. In Hungarian law, that status corresponds to another type of residence permit, namely the EU settlement permit. It follows that NW did not have a residence permit withdrawn under that directive and did not apply for such a residence permit to be issued. Therefore, the interpretation of that directive is not necessary in the present case.

53.      Admittedly, it is for the referring court to establish the facts in a preliminary ruling procedure. Indeed, in its initial request for a preliminary ruling, the referring court found that NW had long-term resident status within the meaning of Directive 2003/109. Nevertheless, it is also important to note that the referring court, by a supplement to its order for reference, seems to have doubts as to the applicability of that directive in Case C‑420/22. It therefore asked the Court of Justice to rule on the basis of Article 20 TFEU, in the event that the Court concluded that the directive was not relevant for resolving the dispute in the main proceedings.

54.      Those doubts seem to be corroborated by the argument of the Hungarian government that in Hungarian law, there is a difference between the EU settlement permit, which transposes the long-term resident status under Directive 2003/109, and the permanent residence card that NW holds, which is based solely on national law and the granting of which is subject to less stringent conditions than those imposed by EU law.

55.      The Court of Justice sent the referring court a request for clarification so that it could set out in detail the reasons why it considers that Directive 2003/109 is applicable in the situation at issue in the main proceedings. In particular, the referring court was asked to specify which residence permit transposes into Hungarian law the long-term resident status provided for by that directive and whether NW held such a residence permit or had applied for one.

56.      In its reply, the referring court explains that NW applied for and was issued with a permanent residence permit valid until 31 October 2022, pursuant to Directive 2004/38, (15) as well as Paragraphs 24 and 25 of Law I, in force at the time, which transposed the directive. The Hungarian legislature later decided that, from 1 January 2019, the directive should no longer apply to a third-country national joining a Hungarian family member in Hungary. From that date, the third-country national would fall within the scope of Directive 2003/109.

57.      The referring court also states that the Hungarian legislature transposed Directive 2003/109 into domestic law by establishing the EU settlement permit and the temporary settlement permit. (16) In that regard, it explains that NW did not apply for either of those two permits. However, that assertion was contradicted at the hearing, since NW’s legal representative stated that NW had subsequently applied for an EU settlement permit and that the procedure was ongoing. (17)

58.      In any event, it follows from the information available to the Court of Justice that the dispute in the main proceedings which gave rise to Case C‑420/22 concerns the withdrawal of a residence permit falling within the scope of national law, and not a residence permit issued pursuant to Directive 2003/109. In my view, it follows that the resolution of this dispute does not depend on an interpretation of the provisions of that directive. In that regard I point out that, contrary to what the referring court seems to suggest in its initial request for a preliminary ruling, it is not sufficient for NW’s situation to correspond to the definition of ‘long-term resident’ in Article 2(b) of that directive to consider that the provisions of the directive apply to him.

59.      Indeed, the Court has held that the system put in place by Directive 2003/109 clearly makes the acquisition of the status of long-term resident conferred by that directive subject to a specific procedure and, in addition, to fulfilment of all the conditions set out in Chapter II of that directive. (18) That requires, in particular, the submission of a specific application accompanied by documentary evidence.

60.      In that regard, it should be noted that, pursuant to Article 4(1) of Directive 2003/109, Member States are to grant long-term resident status to third-country nationals who have resided lawfully and continuously for five years on their territory. The acquisition of that status is not however automatic. In accordance with Article 7(1) of that directive, the third-country national concerned must, for that purpose, lodge an application with the competent national authorities of the Member State in which he or she resides, which must be accompanied by documentary evidence establishing that he or she meets the conditions laid down in Articles 4 and 5 of the directive. In particular, he or she must, in accordance with Article 5(1)(a) of the directive, demonstrate that he or she has stable and regular resources which are sufficient to maintain himself or herself and the members of his or her family without recourse to the social assistance system of the Member State. (19)

61.      It follows from the foregoing that it is not sufficient to meet the substantive conditions imposed by Directive 2003/109 in order to qualify for long-term resident status pursuant to that directive. A third-country national may be authorised to stay for a long period solely on the basis of national law, without falling within the scope of that directive, since it is not intended to fully harmonise the long-term residence of third-country nationals.

62.      Although NW seems to have taken the necessary steps to obtain a residence permit as a long-term resident, under Directive 2003/109, the fact remains that the administrative procedure carried out in that regard is ongoing. Moreover, that procedure is extraneous to the subject matter of the dispute in the main proceedings, which, as I previously mentioned, concerns the withdrawal of a residence permit granted under national law.

63.      In the light of the foregoing, it is appropriate, in my view, in the context of Case C‑420/22, to answer the questions referred by the referring court in its supplementary request for a preliminary ruling, which ask the Court of Justice, as in Case C‑528/22, for an interpretation of Article 20 TFEU.

B.      The need for the authority responsible for matters of residence to examine the existence of a relationship of dependency between the third-country national and his family

64.      By part (a) of its first question in Case C‑528/22, and the corresponding question in Case C‑420/22, the referring court asks, in essence, whether Article 20 TFEU must be interpreted as precluding an authority of a Member State from withdrawing or refusing to issue, on grounds of national security, a residence permit to a third-country national who is a family member of EU citizens who are nationals of that Member State and who have never exercised their right to freedom of movement, without first examining whether there is a relationship of dependency between them which could entitle the third-country national to a derived right of residence.

65.      The Hungarian government argues that neither NW nor PQ relied on Article 20 TFEU during the administrative procedure, whereas an applicant for a residence permit must claim, at least in substance, the derived right of residence based on that article for which he or she wishes to qualify. Furthermore, NW did not rely on that article before the referring court, which therefore exceeded the form of order sought.

66.      As the Court recently pointed out in paragraphs 20 to 26 of its judgment of 22 June 2023, Staatssecretaris van Justitie en Veiligheid (Thai mother of a Dutch minor child), (20) Article 20 TFEU precludes national measures, including decisions refusing a right of residence to the members of the family of an EU citizen, which have the effect of depriving EU citizens of the genuine enjoyment of the substance of the rights conferred by virtue of their status.

67.      However, the provisions of the FEU Treaty on citizenship of the European Union do not confer any autonomous right on third-country nationals. Any rights conferred on third-country nationals are not autonomous rights of those nationals but rights derived from those enjoyed by an EU citizen. The purpose and justification of those derived rights are based on the fact that a refusal to allow them would be such as to interfere, in particular, with an EU citizen’s freedom of movement within the territory of the European Union.

68.      In that regard, the Court has already held that there are very specific situations in which, despite the fact that secondary law on the right of residence of third-country nationals does not apply and the EU citizen concerned has not made use of freedom of movement, a right of residence must nevertheless be granted to a third-country national who is a family member of that EU citizen, since the effectiveness of EU citizenship would otherwise be undermined if, as a consequence of refusal of such a right, that citizen would be obliged in practice to leave the territory of the European Union as a whole, thus depriving him or her of the genuine enjoyment of the substance of the rights conferred by that status.

69.      According to the Court, such a refusal to grant a right of residence to a third-country national is liable to undermine the effectiveness of EU citizenship only if there exists, between that third-country national and the EU citizen who is a family member, such a relationship of dependency that it would lead to the EU citizen, in the absence of that third-country national being granted a right of residence in the territory of the European Union, being compelled to accompany the third-country national concerned and to leave the territory of the European Union as a whole.

70.      As follows from the Court’s case-law, it is in the light of the intensity of the relationship of dependency between the third-country national concerned and the EU citizen, who is a family member of the former, that the recognition of a right of residence under Article 20 TFEU must be assessed, and such an assessment must take account of all the circumstances of the case. (21)

71.      In the present case, the referring court considers there to be a relationship of dependency between each of the third-country nationals concerned and their families, in particular their respective children. Although the Hungarian Government argued otherwise in its written observations with regard to PQ, relying on a description of the facts opposed to that adopted by the referring court, it should be emphasised that the Court must reason on the basis of the factual evidence provided by the referring court in the context of a preliminary ruling procedure. (22)

72.      Furthermore, the Hungarian government maintains that the application of Article 20 TFEU is irrelevant in the present case, in so far as the third-country nationals concerned are not subject to expulsion measures and are therefore not forced to leave the territory of the European Union. That line of argument is, however, unconvincing. Besides the fact that it seems apparent from the evidence before the Court that the third-country nationals are subject to an obligation to leave Hungarian territory, it is clear from the Court’s case-law that Article 20 TFEU may be invoked against a decision refusing to allow residence. (23)

73.      One of the difficulties that arises in the present cases is that NW and PQ did not apply to the Hungarian authorities for a residence permit based on Article 20 TFEU. It must therefore be determined whether those authorities were still obliged to examine whether that article should be applied, given that they were informed of the existence of a family relationship between the third-country nationals concerned and their family members of Hungarian nationality.

74.      In that regard, it follows from the case-law of the Court that the procedural arrangements under which a third-country national may rely on the existence of a derived right under Article 20 TFEU cannot compromise the effectiveness of that article. (24)

75.      Thus, although the national authorities are not obliged to examine systematically and on their own initiative the existence of a relationship of dependency within the meaning of Article 20 TFEU, the person concerned having to provide the evidence enabling them to assess whether the conditions for the application of that article are satisfied, the effectiveness of that article would, nonetheless, be jeopardised if the third-country national or the EU citizen, as a member of his or her family, were prevented from relying on the factors which make it possible to assess whether a relationship of dependency, within the meaning of Article 20 TFEU, exists between them. (25)

76.      Accordingly, the Court has held that, where the competent national authority receives an application from a third-country national for the grant of a right of residence for the purpose of family reunification with an EU citizen who is a national of the Member State concerned, that authority cannot automatically reject that application on the sole ground that the EU citizen does not have sufficient resources. On the contrary, it is for that authority to assess, on the basis of the evidence which the third-country national and the EU citizen concerned must be free to provide and, if necessary, by carrying out the necessary investigations, whether there is a relationship of dependency between those two persons, such that a derived right of residence must, in principle, be granted to that national under Article 20 TFEU. (26)

77.      In the light of that case-law, although Article 20 TFEU does not, to my mind, impose an obligation on the national authorities to examine systematically and on their own initiative the existence of a relationship of dependency within the meaning of that article, they are still required to carry out that examination when there is sufficient evidence before them to support the existence of such a relationship.

78.      That analysis seems to be confirmed by the judgment of 27 April 2023, M.D. (Ban on entering Hungary), (27) in which the Court ruled that a Member State cannot ban entry into the territory of the European Union of a third-country national of whom a family member is an EU citizen, a national of that Member State who has never exercised his or her right to free movement, without having ascertained whether there is a relationship of dependency between that third-country national and that family member. (28)

79.      Accordingly, Article 20 TFEU should, in my opinion, be interpreted as precluding an authority of a Member State from withdrawing or refusing to issue, on grounds of national security, a residence permit to a third-country national who is a family member of EU citizens who are nationals of that Member State and who have never exercised their right to freedom of movement, without having first examined, on the basis of the evidence that the third-country national and the EU citizen concerned must be free to provide and, if necessary, by carrying out the necessary investigations, whether there is a relationship of dependency between those persons which would, in practice, require the EU citizen to leave the territory of the European Union as a whole, to accompany that family member.

80.      However, it should be clarified that, due to the subsidiary nature of the derived right of residence flowing from Article 20 TFEU, such a right should, where appropriate, only be granted in the absence of a right of residence obtained on another basis. (29)

C.      The conditions under which Member States may derogate from the derived right of residence flowing from Article 20 TFEU

81.      The Hungarian legislation has the following characteristics: (i) the decisive intervention of a specialised national security authority which is separate from the authority responsible for matters of residence; (ii) the binding nature for the latter authority of the opinion issued by the specialised authority; (iii) the absence of a statement of reasons for both that opinion and the decision to withdraw or refuse the right of residence; and (iv) the failure to take into account all the relevant individual circumstances.

82.      It is in the light of the characteristics of the Hungarian legislation that the questions put by the referring court ask the Court to specify the substantive and procedural conditions that Member States must comply with to be able to derogate from the derived right of residence flowing from Article 20 TFEU.

1.      The need for an examination by the competent authority in matters of residence of the individual circumstances and the principle of proportionality

83.      By part (b) of its first question and its fifth question in Case C‑528/22, as well as the corresponding questions in Case C‑420/22, the referring court asks the Court of Justice, in essence, to rule as to whether Article 20 TFEU must be interpreted as precluding national legislation under which a decision to withdraw or refuse a right of residence must be adopted on the basis of a non-reasoned binding opinion issued by an authority entrusted with specialised functions relating to national security, without an in-depth examination of all the individual circumstances or the proportionality of the decision to withdraw or refuse the permit.

84.      It is apparent from the case-law of the Court that the Member States may derogate, under certain conditions, from the derived right of residence, flowing from Article 20 TFEU, for a family member of an EU citizen who has not made use of his or her freedom of movement, in order to maintain public order or safeguard public security. That may be the case where the third-country national represents a real, immediate and sufficiently serious threat to public order or public or national security. (30)

85.      However, according to the Court, the application of that derogation cannot be based solely on the criminal record of the third-country national concerned. It can result, where appropriate, only from a specific assessment of all the relevant circumstances of the case, in the light of the principle of proportionality, the fundamental rights the observance of which the Court ensures and, inter alia, the best interests of the minor child, who is an EU citizen. Thus, the competent national authority may take into consideration, inter alia, the gravity of the offences committed and the degree of severity of those convictions, as well as the period between the date on which they are handed down and the date on which that authority gives its decision. Where the relationship of dependency between that third-country national and an EU citizen who is a minor stems from the fact that the former is the parent of the latter, account must also be taken of the age and state of health, as well as the family and economic situation of that minor who is an EU citizen. (31)

86.      The Court has therefore ruled that, where it is established that there is a relationship of dependency between the third-country national concerned and the member of his or her family, who is an EU citizen, the Member State concerned may ban entry and stay in European Union territory of that national for reasons of public order or national security only after having taken into account all the relevant circumstances and, in particular, where appropriate, the best interests of the minor child, who is an EU citizen. (32)

87.      The Hungarian authorities responsible for residence should therefore have taken into account all the relevant circumstances. However, since those authorities are bound, under Hungarian law, by the non-reasoned opinion issued by a body entrusted with specific functions linked to national security, it is impossible for them to weigh up the ground of national security relied on – none of the underlying factual evidence having been disclosed to them – against the personal and family circumstances of the person claiming a right of residence.

88.      Consequently, the Hungarian legislation has the effect of depriving the Hungarian authorities responsible for residence of their power to assess whether the grounds on which a decision to withdraw or refuse a right of residence is adopted allow a derogation from the derived right of residence enjoyed by a third-country national who is a family member of an EU citizen who has not made use of his or her freedom of movement, which is fundamentally contrary to the case-law of the Court of Justice. (33)

89.      Moreover, given the customary scope of the obligation to state reasons, including in relation to the right to an effective remedy, the statement of reasons of a decision to withdraw or refuse residence, which is limited to referring to a non-reasoned opinion issued by a body entrusted with specific functions linked to national security, does not meet the requirements highlighted by the Court in its case-law. (34)

90.      I refer, in particular, to the conclusion reached by the Court in the field of international protection in its judgment in Országos Idegenrendészeti Főigazgatóság and Others, namely that the determining authority cannot validly confine itself to giving effect to a decision, adopted by another authority, which is binding on the former authority under national legislation, and to take, on that basis alone, the decision not to grant subsidiary protection or to withdraw international protection previously granted. (35) The Court has ruled that that authority must, on the contrary, have available to it all the relevant information and, in the light of that information, carry out its own assessment of the facts and circumstances with a view to determining the tenor of its decision and providing a full statement of reasons for that decision. (36)

91.      The same rules should, in my view, apply to the authority responsible for matters of residence.

92.      Admittedly, the scope of those requirements may be limited when classified information is involved, on the basis of a weighing up, on the one hand, of the right to sound administration and the right to an effective remedy and, on the other hand, the safeguarding of national security.

93.      Yet although it is possible that some of the information used by the authority responsible for matters of residence in conducting its assessment can be provided by bodies entrusted with specialist functions linked to national security, on their own initiative or at the request of that authority, and that the information is subject to rules of confidentiality, (37) the fact remains that that authority must be free to assess the scope of that information and its relevance to the decision to be taken. (38) The authority responsible for matters of residence cannot therefore be required to rely on a non-reasoned opinion given by bodies entrusted with specialist functions linked to national security, based on an assessment the factual basis of which has not been disclosed to that authority. (39)

94.      Therefore, Article 20 TFEU must, to my mind, be interpreted as precluding national legislation by virtue of which a decision to withdraw or refuse a right of residence must be adopted on the basis of a non-reasoned binding opinion issued by a body entrusted with specialist functions linked to national security, according to which the person concerned is a threat to that security, without an in-depth examination of all the individual circumstances and the proportionality of that withdrawal or refusal decision.

95.      I would add that, if a decision to withdraw or refuse a right of residence were also to constitute, at the same time, a return decision, within the meaning 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, (40) which it is for the referring court to determine, Article 5 of that directive, which requires Member States in particular to take due account of the best interests of the child, family life and the state of health of the third-country national concerned, should be respected. (41)

2.      Access by the person concerned to the information on which a decision to withdraw or refuse a right of residence was based and its use in the context of the residence procedure

96.      By its second question in Case C‑528/22 and the corresponding question in Case C‑420/22, the referring court asks, in essence, whether Article 20 TFEU, read in the light of Articles 41 and 47 of the Charter, must be interpreted as precluding national legislation which provides that, where a decision withdrawing or refusing a right of residence is based on classified information the disclosure of which would jeopardise the national security of the Member State in question, the person concerned or his or her adviser can access that information only after obtaining authorisation to that end, are not provided with the substance of the grounds on which such a decision is based and cannot, in any case, use, in the context of administrative procedures or judicial proceedings relating to residence, the information to which they may have had access.

97.      In each of the present cases, the referring court asks the Court of Justice about the obligations incumbent, in the event of the adoption of a decision withdrawing or refusing, on grounds of national security, a right of residence which may fall under Article 20 TFEU, on the authority responsible for matters of residence and on bodies entrusted with specialist functions linked to national security, with regard to the access of the person concerned and/or his legal representative to the classified information on the basis of which that decision was adopted and the use of that information in the context of administrative procedures or judicial proceedings relating to residence.

98.      It is apparent from the case-law of the Court of Justice that, in the absence of applicable provisions of EU law on how Member States are to guarantee respect for the rights of defence of the person concerned where his or her right of access to the file is restricted pursuant to national legislation, the practical arrangements of the procedures established to that end are a matter for the domestic legal order of each Member State, in accordance with the principle of the procedural autonomy of the Member States, provided that these are not less favourable than those governing similar domestic situations (principle of equivalence) and that they do not make it impossible in practice or excessively difficult to exercise the rights of defence conferred by the European Union legal order (principle of effectiveness). (42)

99.      It should also be recalled that Member States, when implementing EU law, are required to ensure compliance both with the requirements arising from the right to sound administration, which is a general principle of EU law reflected in Article 41 of the Charter, (43) and the right to an effective remedy enshrined in the first paragraph of Article 47 of the Charter, which require, respectively during the administrative procedure and any judicial proceedings, respect for the rights of defence of the person concerned. (44)

100. In that connection, as regards, in the first place, the administrative procedure, it is settled case-law of the Court that observance of the rights of the defence means that the addressee of a decision which significantly affects his or her interests must be placed in a position, by the authorities of the Member States when they take decisions which come within the scope of EU law, in which he or she can effectively make known his or her views as regards the information on which the authorities intend to base their decision. (45)

101. As the Court has ruled in the matter of international protection, the purpose of this requirement is, in particular, to allow the authority responsible for matters of residence to proceed, in full knowledge of the facts, with the individual assessment of all of the relevant facts and circumstances, which requires that the addressee of that decision be able to correct an error or submit such information relating to his or her personal circumstances as will argue in favour of the adoption or non-adoption of the decision, or in favour of its having a specific content. (46)

102. Since that requirement necessarily supposes that that addressee be afforded, if necessary though an adviser, a concrete possibility to be aware of the evidence on which the authorities intend to base their decision, respect for the rights of the defence has as a corollary the right of access to the file during the administrative procedure. (47)

103. As regards, in the second place, the judicial proceedings, it is settled case-law that if the judicial review guaranteed by Article 47 of the Charter is to be effective, the person concerned must be able to ascertain the reasons upon which the decision taken in relation to him or her is based, either by reading the decision itself or by requesting and obtaining notification of those reasons, without prejudice to the power of the court with jurisdiction to require the authority concerned to provide that information, so as to make it possible for him or her to defend his or her rights in the best possible conditions and to decide, with full knowledge of the relevant facts, whether there is any point in applying to the court with jurisdiction, and in order to put the latter fully in a position in which it may carry out the review of the lawfulness of the national decision in question. (48) Respect for the rights of the defence, which is required in particular in the context of proceedings relating to appeals in right of residence cases, means that the applicant must be able to ascertain not only the reasons upon which the decision taken in relation to him or her is based, but also all of the elements on file on which the authority has based that decision, so as to be able to comment on those elements. (49)

104. Furthermore, the adversarial principle, which forms part of the rights of the defence, which are referred to in Article 47 of the Charter, means that the parties to a case must have the right to examine all the documents or observations submitted to the court for the purpose of influencing its decision, and to comment on them, which presupposes that the person subject to a decision to withdraw a residence permit must be able to acquaint himself or herself with the elements of his or her file which are made available to the court or tribunal called upon to rule on the appeal against that decision. (50)

105. However, it is important to recall that the rights of the defence are not absolute rights, and the right of access to the file, which is the corollary thereto may therefore be limited, on the basis of a weighing up, on the one hand, of the right to sound administration and the right to an effective remedy of the person concerned and, on the other hand, the interests relied on in order to justify the non-disclosure of an element of the file to that person, in particular where those interests relate to national security. (51) Indeed, it may prove necessary, both in administrative proceedings and in judicial proceedings, not to disclose certain information to the person concerned, in particular in the light of considerations connected with State security. (52)

106. The limits of that weighing up have been clarified by the Court.

107. For example, the weighing up cannot lead, in the light of the necessary observance of Article 47 of the Charter, to depriving the rights of defence of the person concerned of all effectiveness and to rendering meaningless the right to a remedy that a person eligible for a derived right of residence under Article 20 TFEU has, in particular by not informing that person, or, as the case may be, his or her adviser, at the very least of the substance of the grounds on which the decision taken against him or her is based. (53)

108. That weighing up may, however, result in certain information in the file not being disclosed to the person concerned, where disclosure of that information is likely to jeopardise the security of the Member State concerned in a direct and specific manner, in that it may, in particular, endanger the life, health or freedom of persons or reveal the methods of investigation specifically used by bodies entrusted with specialist functions relating to national security and thus seriously impede, or even prevent, future performance of the tasks of those authorities. (54)

109. It follows that, although EU law allows the Member States, particularly where national security so requires, not to grant the person concerned direct access to all of his or her file, that law cannot be interpreted, without infringing the principle of effectiveness, the right to sound administration and the right to an effective remedy, as allowing the competent authorities to place that person in a situation where neither he or she nor his or her representative would be able to gain effective knowledge, where applicable in the context of a specific procedure designed to protect national security, of the substance of the decisive elements contained in that file. (55)

110. It is on the basis of those principles that the Court has held, in the matter of international protection, first, that, where the disclosure of information placed on the file has been restricted on grounds of national security, respect for the rights of defence of the person concerned is not sufficiently guaranteed by the possibility for that person of obtaining, under certain conditions, authorisation to access that information, together with a complete prohibition on using the information thus obtained for the purposes of the administrative procedure or any judicial proceedings. (56)

111. It is, in fact, apparent from the requirements stemming from the principle of respect for the rights of the defence that I referred to previously, that the aim of the right of access to information placed on the file is to enable the person concerned, where appropriate through an adviser, to put forward, before the competent authorities or the courts having jurisdiction, his or her point of view on that information and its relevance to the decision adopted or yet to be taken. (57)

112. Accordingly, a procedure affording the person concerned or his or her adviser the possibility of accessing that information, while prohibiting them from using that information for the purposes of the administrative procedure or any judicial proceedings, is not sufficient to protect that person’s rights of defence and cannot therefore be regarded as allowing a Member State to comply with the obligations flowing from Articles 41 and 47 of the Charter. (58)

113. Second, given that it is apparent from the order for reference and the observations of the Hungarian Government that the legislation at issue in the main proceedings is based on the consideration that the rights of defence of the person concerned are sufficiently guaranteed by the power of the court having jurisdiction to have access to the file, it must be pointed out that such an option cannot replace access to the information placed on that file by the person concerned or his or her adviser. (59) Thus, respect for the rights of the defence does not mean that the court having jurisdiction has available to it all relevant information in order to make its decision, but rather that the person concerned, where appropriate through an adviser, may defend his or her own interests by expressing his or her point of view on that information. (60) Indeed, access to the information on the file by the courts having jurisdiction and the establishment of procedures ensuring that the rights of defence of the person concerned are respected are two separate and cumulative requirements. (61)

114. It follows from the foregoing considerations that Article 20 TFEU, read in the light of Articles 41 and 47 of the Charter, must, in my view, be interpreted as precluding national legislation which provides that, where a decision withdrawing or refusing a right of residence is based on information the disclosure of which would jeopardise the national security of the Member State in question, the person concerned or his or her adviser can access that information only after obtaining authorisation to that end, are not provided with the substance of the grounds on which such a decision is based and cannot, in any case, use, in the context of administrative procedures or judicial proceedings relating to residence, the information to which they may have had access.

3.      The concept of essence of the confidential grounds

115. By its third question in Case C‑528/22 and the corresponding question in Case C‑420/22, the referring court asks the Court of Justice to clarify the meaning to be given to the concept of ‘essence’ of the confidential grounds on which a decision to withdraw or refuse a right of residence is based, in the light of Articles 41 and 47 of the Charter.

116. To my mind, that concept refers to the essential information in the file allowing the person concerned to be aware of the main facts and conduct attributed to him or her so that he or she may express his or her point of view in the context of the administrative procedure and any subsequent judicial proceedings relating to residence.

117. Therefore, the concept of ‘essence’ of the confidential grounds must be given a functional interpretation to ensure the effective exercise of the rights of the defence while safeguarding national security interests.

118. The concept must be defined taking into account the necessary confidentiality of the evidence. (62) In certain cases, disclosure of that evidence is liable to compromise State security in a direct and specific manner, in that it may, in particular, endanger the life, health or freedom of persons or reveal the methods of investigation specifically used by the national security authorities and thus seriously impede, or even prevent, future performance of the tasks of those authorities. (63)

4.      The powers of the court having jurisdiction to review the legality of a decision to withdraw or refuse a right of residence

119. By its fourth question in Case C‑528/22 and the corresponding question in Case C‑420/22, the referring court asks the Court, in essence, to rule as to whether Article 20 TFEU, read in the light of Article 47 of the Charter, must be interpreted as requiring the court having jurisdiction to review the legality of a decision to withdraw or refuse a right of residence based on classified information to have the power to declassify such information and disclose it directly, in whole or in part, to the third-country national concerned.

120. That question concerns the powers of the court required to review the legality of a decision on residence. It raises the question of how to balance, in the context of judicial proceedings, the right to an effective judicial remedy with the need to maintain the confidentiality of information the disclosure of which could harm national security interests.

121. It seems clear from the order for reference and the wording of the question put by the referring court that, in the latter’s view, under EU law it should not only have access to classified information, but be able to decide, where appropriate, that the classification of that information is unlawful and disclose it directly, in whole or in part, to the person concerned.

122. At the hearing, the Hungarian and French Governments and the Commission expressed convergent positions on the answer they believe should be given to this question, namely that EU law does not require a court having jurisdiction to review the legality of a decision to withdraw or refuse a right of residence based on classified information to have the power to declassify such information and disclose it to the person concerned.

123. I share that position, drawing on the lessons that can be learned from the judgment in ZZ.

124. In that judgment, the Court has already taken a position on the powers that the court with jurisdiction in matters of residence must have, in the context of Directive 2004/38, to ensure respect for the rights of the defence when a person is subject to a negative decision based on confidential information.

125. It follows from that judgment that, when reasons of State security are invoked to refuse to disclose to the person concerned the grounds on which the adoption of a decision refusing access to the territory of a Member State is based, the court with jurisdiction in that Member State must have at its disposal and apply techniques and rules of procedural law which accommodate, on the one hand, legitimate State security considerations regarding the nature and sources of the information taken into account in the adoption of such a decision and, on the other hand, the need to ensure sufficient compliance with the person’s procedural rights, such as the right to be heard and the adversarial principle. (64)

126. To that end, the Court has ruled that Member States are required, first, to provide for effective judicial review both of the existence and validity of the reasons invoked by the national authority with regard to State security and of the legality of the decision at issue, and, second, to prescribe techniques and rules relating to that review. (65)

127. It also specified that it is important for the court entrusted with review of the decision’s legality to examine both all the grounds and the related evidence on the basis of which the decision was taken, (66) to verify whether State security stands in the way of disclosure of the grounds on which the decision in question is based and the related evidence to the person concerned. (67)

128. The Court of Justice has clarified the inferences to be drawn from the examination conducted in that regard by the national court.

129. Thus, if that court concludes that State security does not stand in the way of disclosure to the person concerned of the information in question, it must give the competent national authority the opportunity to disclose that information to the person concerned. If that authority does not authorise such disclosure, the national court proceeds to examine the legality of the decision relating to residence on the basis of solely the grounds and evidence which have been disclosed. (68)

130. It follows by analogy from the foregoing that Article 20 TFEU, read in the light of Article 47 of the Charter, does not require the court having jurisdiction to review the legality of a decision to withdraw or refuse a right of residence based on classified information to have the power to declassify such information and to disclose it directly to the person concerned. Indeed, it is incumbent on the competent national authority to decide, where appropriate, to provide the person concerned with that information so that it is subject to the adversarial process. If the authority wishes to maintain the confidential nature of the information by not disclosing it, the court must draw inferences from this when reviewing the legality of a decision to withdraw or refuse a right of residence, by conducting that review solely on the basis of the grounds and evidence that have been disclosed. As the French Government correctly stated at the hearing, it is the scope of the exchange of views that is then reduced, and consequently that of the arguments or exhibits on which the court may base its decision. That position appears consistent with Article 346(1)(a) TFEU, which provides that ‘no Member State shall be obliged to supply information the disclosure of which it considers contrary to the essential interests of its security’.

131. However, as I have previously stated, the weighing up between, on the one hand, the right to sound administration and the right to an effective remedy of the person concerned and, on the other hand, the non-disclosure of the confidential information on which the adoption of a decision to withdraw or refuse a right of residence was based cannot lead, in the light of the necessary observance of Article 47 of the Charter, to depriving the person concerned of the basic guarantee which consists of the disclosure, to that person or his or her adviser, at the very least of the substance of the grounds on which the decision taken against him or her is based. (69) Such is the case when the disclosure of the confidential information can validly be refused by the competent national authority for reasons of national security. (70) The review by the court having jurisdiction of the legality of the decision to withdraw or refuse a right of residence must then be carried out solely on the basis of the substance of the grounds disclosed to the person concerned. That court must, if necessary, draw, pursuant to national law, the appropriate conclusions from any failure to comply with that obligation to inform the person concerned, (71) which could lead the court to annul such a decision.

V.      Conclusion

132. Having regard to the foregoing considerations, I suggest that the Court answer the questions referred by the Szegedi Törvényszék (Szeged High Court, Hungary) in Cases C‑420/22 and C‑528/22 as follows:

(1)      Article 20 TFEU must be interpreted as:

–        precluding an authority of a Member State from withdrawing or refusing to issue, on grounds of national security, a residence permit to a third-country national who is a family member of EU citizens who are nationals of that Member State and who have never exercised their right to freedom of movement, without having first examined, on the basis of the evidence that the third-country national and the EU citizen concerned must be free to provide and, if necessary, by carrying out the necessary investigations, whether there is a relationship of dependency between those persons which would, in practice, require the EU citizen to leave the territory of the European Union as a whole, to accompany that family member;

–        precluding national legislation by virtue of which a decision to withdraw or refuse a right of residence must be adopted on the basis of a non-reasoned binding opinion issued by a body entrusted with specialist functions linked to national security, according to which the person concerned is a threat to that security, without an in-depth examination of all the individual circumstances and the proportionality of that withdrawal or refusal decision.

(2)      Article 20 TFEU, read in the light of Articles 41 and 47 of the Charter of Fundamental Rights of the European Union,

must be interpreted as precluding national legislation which provides that, where a decision to withdraw or refuse a right of residence is based on information the disclosure of which would jeopardise the national security of the Member State in question, the person concerned or his or her legal adviser can access that information only after obtaining authorisation to that end, are not provided with the substance of the grounds on which such a decision is based and cannot, in any event, use, for the purposes of administrative procedures or judicial proceedings relating to residence, the information to which they may have had access.

(3)      The concept of ‘essence’ of the confidential grounds on which a decision to withdraw or refuse a right of residence is based refers to the essential information in the file which could allow the person concerned to be aware of the main facts and conduct attributed to him or her so that he or she may express his or her point of view in the context of the administrative procedure and in any judicial proceedings, taking into account the necessary confidentiality of the evidence.

(4)      Article 20 TFEU, read in the light of Article 47 of the Charter of Fundamental Rights,

must be interpreted as not requiring the court having jurisdiction to review the legality of a decision to withdraw or refuse a right of residence based on classified information to have the power to declassify such information and disclose it directly, in whole or in part, to the third-country national concerned.


1      Original language: French.


2      OJ 2004 L 16, p. 44.


3      C‑159/21 (‘the judgment in Országos Idegenrendészeti Főigazgatóság and Others’), EU:C:2022:708.


4      ‘The Charter’.


5      Magyar Közlöny 2007. évi 1. száma.


6      Magyar Közlöny 2007. évi 1. száma.


7      Magyar Közlöny 2018. évi 208. száma.


8      Magyar Közlöny 2007. évi 65. száma.


9      Magyar Közlöny 2009. évi 194. száma.


10      At the hearing, NW’s legal representative stated that, on 22 June 2023, NW had applied to the authority responsible for matters of residence for a residence permit falling within the scope of Directive 2003/109 and that the procedure was ongoing.


11      The referring court explains that, in view of the ground of national security relied on, no authorisation to access classified information may be granted. At the hearing, NW’s legal representative stated that NW had initiated separate proceedings to obtain and use classified information concerning him and that the decision of the Constitutional Protection Office to refuse his application was before the court.


12      In its initial request for a preliminary ruling, the referring court, to reach that conclusion, refers to the definition of ‘long-term resident’ in Article 2(b) of that directive and the fact that NW has a permanent residence permit, regardless of the fact that he does not hold a temporary settlement permit or an EU settlement permit. The referring court relies, in that regard, on paragraph 24 of the judgment of 20 January 2022, Landeshauptmann von Wien (Loss of long-term resident status) (C‑432/20, EU:C:2022:39).


13      C‑300/11, (‘the judgment in ZZ’), EU:C:2013:363.


14      Directive of the European Parliament and of the Council of 29 April 2004 on the right of citizens of the Union and their family members to move and reside freely within the territory of the Member States amending Regulation (EEC) No 1612/68 and repealing Directives 64/221/EEC, 68/360/EEC, 72/194/EEC, 73/148/EEC, 75/34/EEC, 75/35/EEC, 90/364/EEC, 90/365/EEC and 93/96/EEC (OJ 2004 L 158, p. 77, and corrigenda OJ 2004 L 229, p. 35 and OJ 2005 L 197, p. 34).


15      As the Hungarian government made clear during the hearing, the Hungarian legislature has thus chosen to apply more favourable provisions to the right of residence of third-country nationals who are family members of Hungarian nationals.


16      See Paragraphs 34 and 38 of Law II.


17      See footnote 10 of this Opinion.


18      See, inter alia, judgment of 17 July 2014, Tahir (C‑469/13, EU:C:2014:2094, paragraph 27 and the case-law cited).


19      See, inter alia, judgment of 20 January 2022, Landeshauptmann von Wien (Loss of long-term resident status) (C‑432/20, EU:C:2022:39, paragraph 24 and the case-law cited).


20      C‑459/20, EU:C:2023:499.


21      See, inter alia, judgment of 7 September 2022, Staatssecretaris van Justitie en Veiligheid (Nature of the right of residence under Article 20 TFEU) (C‑624/20, EU:C:2022:639, paragraph 38 and the case-law cited).


22      According to settled case-law, since the referring court has defined the factual and regulatory framework of the questions it refers, it is not for the Court to verify their accuracy (see, inter alia, judgment of 8 June 2023, Prestige and Limousine, C‑50/21, EU:C:2023:448, paragraph 43 and the case-law cited).


23      See, inter alia, judgments of 8 March 2011, Ruiz Zambrano (C‑34/09, EU:C:2011:124, paragraph 44); of 13 September 2016, Rendón Marín (C‑165/14, EU:C:2016:675, paragraph 78); and of 10 May 2017, Chavez-Vilchez and Others (C‑133/15, EU:C:2017:354, paragraph 65).


24      See, inter alia, judgment of 27 February 2020, Subdelegación del Gobierno en Ciudad Real (Spouse of a Union citizen) (C‑836/18, EU:C:2020:119, paragraph 51 and the case-law cited).


25      See, inter alia, judgment of 27 February 2020, Subdelegación del Gobierno en Ciudad Real (Spouse of a Union citizen) (C‑836/18, EU:C:2020:119, paragraph 52 and the case-law cited).


26      See, inter alia, judgment of 27 February 2020, Subdelegación del Gobierno en Ciudad Real (Spouse of a Union citizen) (C‑836/18, EU:C:2020:119, paragraph 53 and the case-law cited).


27      C‑528/21, EU:C:2023:341.


28      Paragraph 65 of that judgment and the case-law cited.


29      See, inter alia, judgment of 5 May 2022, Subdelegación del Gobierno en Toledo (Residence of a family member – Insufficient resources) (C‑451/19 and C‑532/19, EU:C:2022:354, paragraphs 47 and 73).


30      See, inter alia, judgment of 27 April 2023, M.D. (Ban on entering Hungary) (C‑528/21, EU:C:2023:341, paragraph 67 and the case-law cited).


31      See, inter alia, judgment of 27 April 2023, M.D. (Ban on entering Hungary) (C‑528/21, EU:C:2023:341, paragraph 68 and the case-law cited).


32      See, inter alia, judgment of 27 April 2023, M.D. (Ban on entering Hungary) (C‑528/21, EU:C:2023:341, paragraph 69).


33      See, by analogy, judgment of 27 April 2023, M.D. (Ban on entering Hungary) (C‑528/21, EU:C:2023:341, paragraph 70).


34      See, in the matter of international protection, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraphs 75 to 79).


35      See the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 79).


36      See the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 80).


37      See, by analogy, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 82).


38      See, by analogy, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 83).


39      See, by analogy, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 83).


40      OJ 2008 L 348, p. 98.


41      See, inter alia, judgment of 27 April 2023, M.D. (Ban on entering Hungary) (C‑528/21, EU:C:2023:341, paragraph 89 and the case-law cited).


42      See, by analogy, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 43 and the case-law cited).


43      See, inter alia, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 35 and the case-law cited).


44      See, inter alia, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 44 and the case-law cited).


45      See, inter alia, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 45 and the case-law cited).


46      See, by analogy, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 46 and the case-law cited).


47      See, inter alia, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 47 and the case-law cited).


48      See, inter alia, judgment of 24 November 2020, Minister van Buitenlandse Zaken (C‑225/19 and C‑226/19, EU:C:2020:951, paragraph 43 and the case-law cited).


49      See, by analogy, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 48 and the case-law cited).


50      See, by analogy, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 49 and the case-law cited).


51      See, inter alia, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 50 and the case-law cited).


52      See, to that effect, the judgment in ZZ (paragraph 54).


53      See, by analogy, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 51 and the case-law cited).


54      See, inter alia, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 52 and the case-law cited).


55      See, by analogy, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 53).


56      See the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 54).


57      See the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 55).


58      See, by analogy, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 56).


59      See the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 57).


60      See the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 58).


61      See the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 59).


62      See the judgment in ZZ (paragraph 68).


63      See the judgment in ZZ (paragraph 66).


64      See the judgment in ZZ (paragraph 57).


65      See the judgment in ZZ (paragraph 58).


66      See the judgment in ZZ (paragraph 59).


67      See the judgment in ZZ (paragraphs 60 to 62).


68      See the judgment in ZZ (paragraph 63).


69      See, inter alia, the judgment in Országos Idegenrendészeti Főigazgatóság and Others (paragraph 51 and the case-law cited).


70      See the judgment in ZZ (paragraphs 64 to 67).


71      See the judgment in ZZ (paragraph 68).