As regards Directive 2003/109, concerning the status of third-country nationals who are long-term residents, although Article 3(1) of that directive makes the status of long-term resident, with the attendant right to equal treatment in the areas covered by Article 11 of that directive, conditional upon legal residence, that directive in no way precludes other EU acts, such as Directive 80/987, from conferring, subject to different conditions, rights on third-country nationals with a view to achieving the individual objectives of those acts.

Competence under Article 137(2) EC, the legal basis for Directive 2002/74, amending Directive 80/987 on the approximation of the laws of the Member States relating to the protection of employees in the event of the insolvency of their employer to adopt minimum requirements to improve living and working conditions, the objective referred to in Article 136 EC, is not limited so as to concern only the living and working conditions of nationals of Member States, to the exclusion of third-country nationals.

The provisions of Directive 80/987 on the approximation of the laws of the Member States relating to the protection of employees in the event of the insolvency of their employer, as amended by Directive 2002/74, must be interpreted as precluding national legislation on the protection of employees in the event of the insolvency of their employer under which a third-country national who is not legally resident in the Member State concerned is not to be regarded as an employee with the right to an insolvency benefit — on the basis, in particular, of claims relating to unpaid wages — in the event of his employer’s insolvency, even though that third-country national is recognised under the civil law of the Member State as having the status of ‘employee’ with an entitlement to pay which could be the subject of an action against his employer before the national courts.

First of all, neither Article 1(1) nor the other provisions of Directive 80/987 exclude third-country nationals from the scope of the directive; nor do they expressly permit Member States to do so.

Next, under the terms of Article 1(1) of Directive 80/987, that directive is intended to apply to wage claims held by any employee against his employer. By contrast, the possibility under Article 1(2) and (3) of Directive 80/987 for Member States to exclude certain categories of employee from the scope of that directive concerns only specific cases and is subject to conditions.

Furthermore, Article 1(2) of Directive 80/987, which makes it possible, by way of exception, to exclude certain categories of employee by virtue of the existence of other forms of guarantee, does not release Member States from every obligation to provide those employees with protection in the event of their employer’s insolvency; rather, it requires that the employees concerned be offered protection equivalent to that arising from the directive.

In that regard, although the national legislation at issue in the main proceedings in principle categorises every natural person under the age of 65 years who is employed on the basis of a legal relationship governed by private law or by public law as an ‘employee’ with entitlement to insolvency benefit, it excludes, however, illegally staying third-country nationals from the definition of ‘employee’ and, accordingly, from any entitlement to the insolvency benefit.

In view of the fact that the national legislation does not grant ‘illegally staying third-country nationals’ protection equivalent to the insolvency benefit, it does not satisfy the conditions that must be met in order to exclude certain categories of ‘employee’ under Article 1(2) of Directive 80/987. Moreover, it is common ground that that provision is unrelated to Article 1(3) of Directive 80/987 which makes it possible to exclude domestic servants employed by a natural person and share-fishermen.

Furthermore, in view of the social objective of Directive 80/987 and the terms of Article 1(1), under which the directive is to apply ‘to employees’ claims arising from contracts of employment or employment relationships’, the definition of the term ‘employee’ necessarily refers to an employment relationship that gives rise to a right, held vis-à-vis the employer, to receive payment for work done. Those elements are present in the definition of the term ‘employee’ under national law.

It would thus be contrary to the social objective of Directive 80/987, which is to guarantee employees a minimum of protection at EU level in the event of the employer’s insolvency through payment of outstanding claims resulting from contracts of employment or employment relationships and relating to pay for a specific period, to deny the protection provided for under that directive in the event of the employer’s insolvency to individuals to whom national legislation generally attributes the status of employees and who, by virtue of that legislation, have wage claims vis-à-vis their employer arising from contracts of employment or employment relationships, as referred to in Article 1(1) and the first paragraph of Article 3 of that directive.

(see paras 36-38, 40-42, 44, 45, 49, operative part)