In the present case, it should be noted that the legislation of a Member State under which, during the transitional period provided for in Chapter 2, paragraph 2 of Annex V to the Act of Accession of Croatia, the hiring-out, within the meaning of Article 1(3)(c) of Directive 96/71, of Croatian nationals in the territory of that Member State continues to be subject to the obtaining of a work permit is, as a measure regulating access by Croatian nationals to the labour market of that Member State, within the meaning of Chapter 2, paragraph 2 of Annex V to the Act of Accession of Croatia, compatible with Articles 56 and 57 TFEU (see, by analogy, judgment of 10 February 2011, Vicoplus and Others, Joined Cases C‑307/09 to C‑309/09 , EU:C:2011:64 , paragraphs 32 and 33 ).

Articles 56 and 57 TFEU, together with Chapter 2, paragraph 2 of Annex V to the Act concerning the conditions of accession of the Republic of Croatia and the adjustments to the Treaty on European Union, the Treaty on the Functioning of the European Union and the Treaty establishing the European Atomic Energy Community must be interpreted as meaning that a Member State is entitled to restrict, by the requirement of a work permit, the posting of Croatian workers who are employed by an undertaking which has its registered office in Croatia, when the posting of those workers takes place through their hiring-out, within the meaning of Article 1(3)(c) of Directive 96/71/EC of the European Parliament and of the Council of 16 December 1996 concerning the posting of workers in the framework of the provision of services, to an undertaking established in another Member State, for the purposes of the provision of services in the first of those Member States by the latter undertaking.

Articles 56 and 57 TFEU must be interpreted as meaning that a Member State is not entitled to require that third-country nationals, hired out to an undertaking established in another Member State, by another undertaking which is also established in that other Member State, for the purposes of providing a service in the first of those Member States, have a work permit.

As regards the posting of workers who are third-country nationals by a service provider established in a Member State of the European Union, the Court has already held that national provisions which make the provision of services within national territory by an undertaking established in another Member State subject to the issue of an administrative authorisation constitute a restriction on the freedom to provide services within the meaning of Article 56 TFEU (judgment of 11 September 2014, Essent Energie Productie, C‑91/13, EU:C:2014:2206, paragraph 45).

However, where national legislation falling within an area which has not been harmonised at European Union level is applicable without distinction to all persons and undertakings operating in the territory of the Member State concerned, it may, notwithstanding its restrictive effect on the freedom to provide services, be justified where it meets an overriding requirement in the public interest and that interest is not already safeguarded by the rules to which the service provider is subject in the Member State in which it is established, and in so far as it is appropriate for securing the attainment of the objective which it pursues and does not go beyond what is necessary in order to attain it (judgment of 11 September 2014, Essent Energie Productie, C‑91/13, EU:C:2014:2206, paragraph 48).

In that regard, it must be recalled that although the desire to avoid disturbances on the labour market is undoubtedly an overriding reason in the public interest, workers who are employed by an undertaking established in a Member State and posted to another Member State for the purposes of providing services there do not purport to gain access to the labour market of that second State, as they return to their country of origin or residence after the completion of their work (judgment of 11 September 2014, Essent Energie Productie, C‑91/13, EU:C:2014:2206, paragraph 51).

A Member State retaining on a permanent basis a requirement for a work permit for third-country nationals who are made available to an undertaking established in that Member State by an undertaking established in another Member State exceeds what is necessary to achieve the objective consisting in preventing disturbances on the labour market (see, to that effect, judgment of 11 September 2014, Essent Energie Productie, C‑91/13, EU:C:2014:2206, paragraph 56).

(see paras 44, 46, 48, 49, 53, operative part 2)