How to Get a Work Permit in Morocco as a Foreigner

Immigration March 2026 10 min read

In This Guide

Who Needs a Work Permit The ANAPEC Labor Market Test Employer Obligations Documents Required The Application Procedure Processing Time Work Permit and Carte de Séjour Self-Employment vs Employment Frequently Asked Questions

Who Needs a Work Permit

Under the Moroccan Labor Code (Code du Travail, Law 65-99) and Law 02-03 on the entry and stay of foreigners in Morocco, any foreign national who takes up paid employment in Morocco must hold a valid work authorization (autorisation de travail) issued by the Ministry of Employment (Direction de l'Emploi).

This requirement applies to all foreign employees working for Moroccan companies, foreign companies with a presence in Morocco (branches, subsidiaries), and international organizations operating in Morocco under private employment conditions.

Limited exceptions exist for:

  • Diplomatic and consular personnel covered by the Vienna Convention
  • Staff of certain international organizations operating under specific agreements with Morocco
  • Foreign nationals married to Moroccan citizens (who may benefit from simplified procedures in some cases)
  • Certain categories of trainees and interns (subject to specific rules)

Working without a valid work authorization is an administrative violation that exposes both the employer and the employee to sanctions, including fines and, for the employee, potential regularization difficulties or deportation proceedings.

The ANAPEC Labor Market Test

Before a Moroccan employer can hire a foreign national, they must demonstrate that no qualified Moroccan candidate is available for the position. This is done through the ANAPEC labor market test (test du marché du travail), administered by ANAPEC (Agence Nationale de Promotion de l'Emploi et des Compétences).

The test works as follows:

  1. The employer registers the vacant position with ANAPEC, describing the role, required qualifications, experience, and remuneration.
  2. ANAPEC publishes the vacancy and attempts to identify suitable Moroccan candidates from its database and job seekers registered with the agency.
  3. If ANAPEC identifies suitable Moroccan candidates, the employer is expected to interview them. If a suitable Moroccan candidate is available and willing, the employer is not cleared to hire a foreign national for the role.
  4. If ANAPEC cannot identify suitable Moroccan candidates within the designated period (typically one month), it issues a clearance (attestation de carence or confirmation) that allows the employer to proceed with the foreign hire.

The ANAPEC test is not required in all cases. Certain highly specialized positions, positions filled through intra-group transfers, and positions in certain strategic sectors may follow modified procedures. The applicable rules should be confirmed with the Ministry of Employment.

Employer Obligations

The Moroccan employer carries the primary responsibility for the work authorization process. Key obligations include:

  • Initiating and completing the ANAPEC labor market test before signing a final employment contract
  • Preparing and submitting the work authorization application file to the Ministry of Employment
  • Ensuring the employment contract complies with the Moroccan Labor Code (minimum wage, leave entitlements, social security contributions)
  • Registering the foreign employee with CNSS (Caisse Nationale de Sécurité Sociale) once employment commences
  • Notifying the administration of any changes to the employment relationship (contract renewal, modification, or termination)
  • Maintaining records of the foreign employee's work authorization and residence card

Employers who hire foreign nationals without a valid work authorization face administrative fines and potential criminal liability under Moroccan labor law.

Documents Required

The work authorization application file submitted by the employer typically includes the following documents:

  • Application form (imprimé de demande d'autorisation de travail), available from the Ministry of Employment
  • Draft employment contract (contrat de travail), signed by the employer and employee, in Arabic or French
  • ANAPEC attestation confirming the outcome of the labor market test
  • Copy of the foreign employee's valid passport
  • Curriculum vitae of the foreign employee
  • Copies of the employee's professional qualifications and diplomas (translated and legalized if issued abroad)
  • Employer registration documents: RC (registre de commerce), tax registration (identifiant fiscal), CNSS registration
  • For companies: the most recent balance sheet and financial statements (sometimes required to demonstrate financial capacity)

The exact checklist may vary slightly by Ministry of Employment regional office and by sector. Confirming the current requirements before submission avoids delays.

The Application Procedure

The work authorization procedure unfolds in the following sequence:

  1. ANAPEC test: The employer registers the vacancy with ANAPEC and completes the labor market test. This typically takes 4 to 6 weeks.
  2. Draft contract: Once the ANAPEC clearance is obtained, the employer and employee sign a draft employment contract. The contract may be conditional on the work authorization being issued.
  3. Ministry submission: The employer submits the complete file to the Direction de l'Emploi (Ministry of Employment), either at the national level or through the regional employment service (Direction Régionale de l'Emploi) responsible for the employer's registered address.
  4. Review and approval: The Ministry reviews the file. If approved, it issues the autorisation de travail (work authorization), endorsed on the employment contract.
  5. Visa application: If the employee is not yet in Morocco or has only entered on a tourist basis, they typically travel to the Moroccan consulate in their country to obtain a long-stay work visa using the approved work authorization.
  6. Carte de séjour: After arriving in Morocco (or if already present), the employee applies for a carte de séjour salarié at the prefecture using the approved work authorization and employment contract.

Processing Time

The overall timeline for a foreign employee to become legally authorized to work in Morocco is as follows:

  • ANAPEC test: 4 to 6 weeks
  • Work authorization processing at the Ministry: 4 to 8 weeks after submission of a complete file
  • Visa processing at the consulate (if applicable): 2 to 4 weeks
  • Carte de séjour processing after arrival: 1 to 3 months (with récépissé issued immediately)

Total time from initiating the ANAPEC test to the employee being fully regularized in Morocco typically ranges from 3 to 6 months, depending on the prefecture, sector, and completeness of the files submitted at each stage.

Planning ahead is important, particularly for companies that need to onboard employees for time-sensitive projects.

Work Permit and Carte de Séjour

The work authorization (autorisation de travail) and the carte de séjour salarié are two distinct but linked documents:

  • The autorisation de travail is issued by the Ministry of Employment. It authorizes the specific employment relationship between the named employer and the named employee for the duration of the employment contract.
  • The carte de séjour salarié is issued by the prefecture and confirms the employee's right to reside in Morocco on the basis of their employment.

Both documents must remain valid for the employee to work and reside legally in Morocco. If the employment ends — due to resignation, dismissal, or contract expiry — the basis for the carte de séjour lapses. The former employee has a limited period to either find new employment (which will require a new work authorization) or regularize their stay on another basis, or depart Morocco.

A change of employer requires a new autorisation de travail and an update to the carte de séjour. The new employer must initiate the ANAPEC test for the new position, unless an exemption applies.

Self-Employment vs Employment

Foreign nationals who do not wish to be employed by a Moroccan company but instead wish to work independently or run their own business follow a different legal pathway:

  • To operate as a business owner or company director, the foreign national must incorporate a legal entity in Morocco (such as a SARL or SA) and register with the Centre Régional d'Investissement (CRI). The company formation process is covered in the guide on starting a company in Morocco as a foreigner.
  • As a shareholder or director of a Moroccan company, the foreign national applies for a carte de séjour as an investor or director, rather than as an employee. The ANAPEC test does not apply to this situation.
  • Certain professional activities (lawyers, doctors, architects, accountants) are subject to professional licensing requirements under specific Moroccan laws and bar or professional associations, in addition to the general residency requirements.

Frequently Asked Questions

Does every foreign worker need a work permit in Morocco?

Yes. Any foreign national taking up paid employment in Morocco requires a valid autorisation de travail, with limited exceptions for diplomatic personnel and certain international organization staff. Working without this authorization exposes both employer and employee to sanctions.

What is the ANAPEC test?

The ANAPEC test is a labor market test requiring the employer to demonstrate that no qualified Moroccan candidate is available for the position before hiring a foreign national. The employer registers the vacancy with ANAPEC, which searches for local candidates. If none is found within the designated period, the employer receives a clearance to proceed.

Who files for the work permit — employer or employee?

The employer files the work authorization application at the Ministry of Employment. The employee provides the necessary documents (passport copy, qualifications) for inclusion in the file, but the administrative responsibility rests with the employer.

Can I be self-employed in Morocco as a foreigner?

Yes, through incorporation of a business entity. A foreign national who forms a company in Morocco and operates as a shareholder-director applies for a carte de séjour as an investor or director, not through the employee work permit process. Certain regulated professions have additional requirements.

How long does a work permit last in Morocco?

The work authorization is tied to the employment contract duration. It must be renewed when the contract is extended and is invalidated if the employment ends. The linked carte de séjour is issued for one year and renewed annually. A change of employer requires a new work authorization from the Ministry of Employment.

Have a Legal Question?

This guide is for informational purposes. For advice specific to your situation, contact our office.

Request a Consultation