By Zakaria Korte, Korte Law in association with Amereller
In short: Employing expatriates in Morocco runs through the Labour Code (Law 65-99): every foreign employee needs a work authorisation obtained by the employer via ANAPEC and a Ministry-of-Labour "visaed" contract, a process that typically takes 3–5 months. The employer must enrol staff in the CNSS and withhold income tax from day one. A foreign director can also be an employee, but only where a genuine subordination link exists.
Foreign companies staffing projects in Morocco quickly discover that compliance hinges on getting the work authorization, payroll, and social security pieces right from day one. This guide explains how to lawfully employ expatriates in Morocco, with practical insights from a practitioner's perspective in Rabat. It covers work permit requirements, the ANAPEC attestation process, contract visa formalities, payroll obligations, CNSS registration, tax withholding, and the compliance pitfalls to avoid.
Moroccan law requires foreign nationals to hold a duly "visaed" employment contract issued by the Ministry of Employment and to be registered for social security where applicable. In most cases, before the contract visa is granted, the company must obtain an ANAPEC attestation confirming either the unavailability of a suitable Moroccan candidate or the applicability of an exemption. Employers must also onboard expatriates into payroll, withhold individual income tax at source, and register with the national social security fund (CNSS) unless a totalization agreement applies and a certificate of coverage is produced.
From a timeline standpoint, plan for several weeks from job posting to final work authorization, and build internal controls to track renewals well before expiry. Coordination among HR, legal, and payroll functions—plus clear documentation—is essential.
The standard employment route for a foreign national involves two complementary steps:
Certain categories may be exempted from the ANAPEC labor market test. Examples often include intra-group transfers for specialized roles, senior executives tied to approved investment projects, and other narrowly defined categories in practice. Because exemptions turn on the specific facts, companies should align the role description and evidence of expertise to the claimed exemption and keep the supporting file well organized.
First-time visaed contracts are typically granted for a limited term tied to the initial employment period. Expect a more detailed review of role justification and candidate profile at the first issuance. Build time for potential questions or requests for clarifications.
Renewals are generally permitted if the role and the expatriate's continued engagement remain justified. Authorities may revisit the underlying conditions, including whether a local replacement could now be available. Start renewals early, track expiries rigorously, and ensure the employee's function, title, and remuneration remain aligned with the original justification or that you provide a reasoned update.
Build contingencies into onboarding calendars, and instruct candidates not to commence work until authorization is granted.
A foreign employer hiring in Morocco must be able to operate a Moroccan payroll and comply with wage, withholding, and social security obligations. This typically requires a Moroccan legal presence or a compliant alternative structure. The payroll must respect Moroccan labor standards on wages, working time, leave, and end-of-service entitlements.
In addition to CNSS, employers generally fund a professional training contribution and must carry workplace accident insurance via a Moroccan insurer.
Employers must affiliate with the Caisse Nationale de Sécurité Sociale (CNSS) and register employees from their first day of work. Registration is handled through CNSS's digital platforms.
Moroccan social security covers various branches, including family allowances, pension/old-age, short-term benefits, and mandatory health insurance. Contributions are typically shared between employer and employee and are calculated on the basis of gross salary with applicable caps or rules per branch.
If the expatriate remains affiliated to a foreign social system under an applicable bilateral or multilateral social security agreement, Morocco may recognize a certificate of coverage for the covered branches, relieving CNSS contributions in Morocco during the detachment/secondment period. Maintain:
Where no agreement applies, Moroccan CNSS rules generally govern from day one.
Moroccan tax residency is determined by statutory criteria such as habitual abode, center of economic interests, or days of presence during a tax year. Tax residents are taxed on worldwide income, while non-residents are taxed on Moroccan-source income.
Morocco offers a clear, workable pathway for foreign employers to hire expatriate talent, provided the process is respected and documentation is consistent. Treat ANAPEC and the contract visa as an integrated compliance track, design payroll and CNSS onboarding in parallel, and maintain airtight records from recruitment through renewal. With disciplined preparation and local execution, expatriate onboarding in Morocco can be timely, compliant, and aligned with project realities.
Yes. Under Article 516 of the Labour Code (Law 65-99), the employer must obtain a work authorisation for any foreign national, filing on the worker's behalf (typically via the TAECHIR platform). The process runs sequentially — ANAPEC certificate, then Ministry-of-Labour authorisation, then an entry visa at a consulate, then a residence card from the DGSN within three months of arrival — generally taking 3–5 months.
Morocco applies a national-preference principle: before hiring a foreigner, the employer must show no qualified Moroccan candidate is available. ANAPEC administers this labour-market test and issues an attestation confirming no suitable local candidate exists, usually requiring a detailed position description and bilingual (French/Arabic) newspaper advertisements. Certain categories, such as intra-company transfers, may be exempt.
The contract must use the standard template issued by the labour authorities and be submitted (typically in five originals, with the ANAPEC certificate) to the Ministry of Employment for a formal "visa" confirming compliance with Moroccan labour standards. The visaed contract is the only document enforceable in litigation, and Moroccan mandatory labour rules apply regardless of any foreign choice-of-law clause.
All employees, including foreign nationals, must be enrolled in the CNSS from the first day — the employer's obligation. In 2026, CNSS contributions total roughly 21.09% (employer) and 6.74% (employee), about 27.83% combined, covering family allowances, social benefits, AMO health insurance and vocational training. Income tax (IR) is withheld at source on a progressive 0–37% scale with an annual exemption of MAD 40,000.
Moroccan law does not prohibit a company director from also holding an employment contract, but the dual status must meet strict conditions: the employment role must be genuine and technically distinct from the corporate mandate, performed under a real subordination link to a superior company organ, and separately remunerated. Absent these, the "employment" can be recharacterised.
Chief risks are hiring without ANAPEC clearance and a visaed contract (fines, possible closure, and action against executives under Articles 519–520 of Law 65-99), CNSS non-registration (fines and surcharges), and paying salaries offshore without proper Moroccan payroll and tax compliance.
Related ArticlesFor expert guidance, contact Korte Law.