Key takeaways: A Practice Guide for Foreign Companies
Morocco’s tech talent pool is increasingly attractive to US and European companies looking to engage software developers, designers, data scientists, and other specialists on a contractor basis. The cost advantage is significant, the time-zone overlap with Europe is convenient, and many Moroccan professionals are fluent in French and English.
But Moroccan labor law draws a sharp line between genuine independent contractors and employees—and the consequences of getting it wrong are severe. If a Moroccan court or the Caisse Nationale de Sécurité Sociale (CNSS) requalifies your contractor as an employee, you face backdated social-security contributions, tax-withholding liability, severance, damages, and potential criminal penalties.
This guide explains the legal framework, walks through the requalification risks, and sets out practical steps to structure a compliant consultancy relationship under Moroccan law.
Article 6 of Law 65-99 (Code du Travail) defines an employee as any person who undertakes to perform work under the direction and supervision (sous la direction et la surveillance) of an employer in return for remuneration. The decisive criterion is the existence of a lien de subordination juridique—a legal subordination link. If subordination exists, the relationship is employment, regardless of what the contract says.
Article 8 of the Code du Travail reinforces this: an employment contract may be established by any means of proof. Moroccan courts consistently apply a substance-over-form approach, meaning the label on the contract is not determinative.
Moroccan courts use a faisceau d'indices (bundle of indicators) method to assess whether legal subordination exists. The key factors include:
No single factor is decisive. Courts weigh the totality of the circumstances. However, a combination of fixed hours, single-client economic dependence, and company-provided equipment will almost certainly result in requalification.
Requalification retroactively converts the entire contractor relationship into an employment relationship from day one. The financial and legal exposure is substantial.
Under Article 52 of the Code du Travail, any employee dismissed after six months of service is entitled to a severance indemnity (indemnité de licenciement). Article 53 sets the scale: 96 hours' wages per year for the first 5 years of service; 144 hours for years 6–10; 192 hours for years 11–15; and 240 hours per year beyond 15 years.
Article 43 requires notice periods that vary by employee category and seniority, as further specified by Decree No. 2-04-469. For cadres (the classification most tech professionals would fall under), the notice period ranges from one to three months depending on seniority. Failure to provide notice triggers a compensatory indemnity equal to the salary that would have been earned during the notice period.
Under Article 59 of the Code du Travail, if the dismissal is deemed abusive, the employee is entitled to damages calculated at 1.5 days' wages per year of seniority, capped at 36 months' wages. In a requalification scenario, the termination of the contractor relationship is treated as a dismissal—often an abusive one, since no dismissal procedure was followed.
Additionally, Article 41 provides that an employee may seek conciliation before the labour inspector prior to filing a court action. The conciliation agreement, once countersigned by the labour inspector, has the force of a final judgment and is non-appealable.
The Dahir of 27 July 1972 (No. 1-72-184) governs social security. Upon requalification, the employer owes backdated CNSS contributions for the entire period of the relationship—approximately 21.09% (employer share) plus 6.74% (employee share) of gross salary. Article 28 of the Dahir imposes late-payment surcharges (majorations de retard) at 3% per month on outstanding contributions. For a multi-year engagement, the cumulative exposure can be severe.
Articles 56–58 of the Code Général des Impôts (CGI) require employers to withhold income tax (Impôt sur le Revenu) at source on salary payments. If a contractor is requalified, the company is liable for the full amount of tax that should have been withheld during the relationship, plus penalties and interest. The tax administration has a four-year statute of limitations for assessments, but this runs from the end of the year in which the tax was due—meaning exposure can extend significantly.
The goal is to ensure that the substance of the relationship reflects genuine independence. A well-drafted contract is necessary but not sufficient—the day-to-day reality must match.
Law 114-13 created the auto-entrepreneur status in 2015, providing a simplified registration and tax framework for individual service providers. Key features:
Requiring your contractor to hold auto-entrepreneur status and issue proper invoices adds a layer of formality. However, auto-entrepreneur registration is not by itself a shield against requalification. Courts still look at the substance of the relationship. A contractor who is registered as an auto-entrepreneur but works exclusively for one client, on a fixed schedule, with company equipment, remains at high risk of requalification.
A genuine independent contractor's income is taxed as professional income (revenus professionnels) under Article 73 of the CGI, not as salary income. The contractor is responsible for their own tax filings and social-security contributions. The hiring company has no withholding obligation.
For TVA (VAT) purposes, independent contractors whose turnover exceeds the applicable threshold are subject to TVA at 20%. Foreign companies should ensure that invoices from Moroccan contractors comply with Moroccan invoicing requirements.
Foreign companies have three main options for engaging talent in Morocco, each with distinct legal trade-offs.
Terminating a contractor engagement requires care, particularly if there is any risk that the relationship could be requalified as employment.
A well-drafted consultancy agreement should include clear termination provisions: notice periods for termination without cause (typically 30 to 90 days), termination triggers for cause, and the treatment of work in progress and outstanding invoices upon termination.
If the relationship is later requalified as employment, the contractual notice period may be insufficient—Article 43 of the Code du Travail and Decree No. 2-04-469 impose statutory notice periods that may be longer than what the contract provides. The statutory period prevails.
Articles 1098–1116 of the Dahir des Obligations et Contrats (DOC) govern settlement agreements (transaction). A transaction is a contract by which the parties terminate or prevent a dispute through mutual concessions (Article 1098). When ending a contractor relationship, a properly drafted transaction agreement provides significant legal certainty.
Key requirements for an enforceable transaction under the DOC:
If the contractor relationship has already been requalified—or if requalification is likely—the termination falls under employment-law procedures. Article 41 of the Code du Travail allows an employee to seek conciliation before the labour inspector. If conciliation succeeds, the resulting agreement must be countersigned by the labour inspector and is non-appealable. This mechanism provides finality but requires the employer to engage with the labour-inspection process.
In practice, combining a DOC transaction with Article 41 conciliation—where warranted—offers the strongest protection against future claims.
Before Engagement
During the Engagement
At Termination
Structural Decisions
This guide is intended for general informational purposes and does not constitute legal advice. The application of Moroccan law to specific facts requires analysis by qualified counsel.