Accordingly, the concept of ‘public policy’, in Articles 27 and 28 of Directive 2004/38 has been interpreted in the Court’s case-law as meaning that recourse to that concept presupposes, in any event, the existence, in addition to the social disturbance which any infringement of the law involves, of a genuine, present and sufficiently serious threat affecting one of the fundamental interests of society (judgment of 24 June 2015, H.T., C‑373/13 , EU:C:2015:413 , paragraph 79 and the case-law cited).

As regards the concept of ‘public security’, it is clear from the Court’s case-law that this concept covers both the internal and external security of a Member State (judgment of 23 November 2010, Tsakouridis, C‑145/09 , EU:C:2010:708 , paragraph 43 ). Internal security may be affected by, inter alia, a direct threat to the peace of mind and physical security of the population of the Member State concerned (see, to that effect, judgment of 22 May 2012, I., C‑348/09 , EU:C:2012:300 , paragraph 28 ). As regards external security, that may be affected by, inter alia, the risk of a serious disturbance to the foreign relations of that Member State or to the peaceful coexistence of nations (see, to that effect, judgment of 23 November 2010, Tsakouridis, C‑145/09 , EU:C:2010:708 , paragraph 44 ).

Article 27(2) of Directive 2004/38/EC 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, must be interpreted as meaning that the fact that a European Union citizen or a third-country national family member of such a citizen, who applies for a right of residence in the territory of a Member State, has been the subject, in the past, of a decision excluding him from refugee status under Article 1F of the Convention Relating to the Status of Refugees, signed in Geneva on 28 July 1951 and supplemented by the Protocol Relating to the Status of Refugees, concluded in New York on 31 January 1967, or Article 12(2) of Directive 2011/95/EU of the European Parliament and of the Council of 13 December 2011 on standards for the qualification of third-country nationals or stateless persons as beneficiaries of international protection, for a uniform status for refugees or for persons eligible for subsidiary protection, and for the content of the protection granted, does not enable the competent authorities of that Member State to consider automatically that the mere presence of that individual in its territory constitutes, whether or not there is any risk of re-offending, a genuine, present and sufficiently serious threat affecting one of the fundamental interests of society, capable of justifying the adoption of measures on grounds of public policy or public security.

The finding that there is such a threat must be based on an assessment, by the competent authorities of the host Member State, of the personal conduct of the individual concerned, taking into consideration the findings of fact in the decision to exclude that individual from refugee status and the factors on which that decision is based, particularly the nature and gravity of the crimes or acts that he is alleged to have committed, the degree of his individual involvement in them, whether there are any grounds for excluding criminal liability, and whether or not he has been convicted. That overall assessment must also take account of the time that has elapsed since the date when the crimes or acts were allegedly committed and the subsequent conduct of that individual, particularly in relation to whether that conduct reveals the persistence in him of a disposition hostile to the fundamental values enshrined in Articles 2 and 3 TEU, capable of disturbing the peace of mind and physical security of the population. The mere fact that the past conduct of that individual took place in a specific historical and social context in his country of origin, which is not liable to recur in the host Member State, does not preclude such a finding.

In accordance with the principle of proportionality, the competent authorities of the host Member State must, in addition, weigh the protection of the fundamental interest of society at issue, on the one hand, against the interests of the person concerned in the exercise of his right to freedom of movement and residence as a Union citizen and in his right to respect for private and family life.

(see paras 65-67, operative part 1)