A Lyon engineer takes a job in Casablanca. A Benin developer gets hired in Rabat. A Belgian consultant wants to move to Marrakech with a signed offer in her bag. Each of them asks the same thing before booking a flight: what is the work permit Morocco actually requires, and who files it? The answer is a surprise to most people, because the process hangs on the employer far more than on the employee.
There's no standalone work permit Morocco hands to the worker. A foreigner needs a contract visaed by the labour authority (article 516 of the Labour Code), filed by a Moroccan employer, usually with an ANAPEC attestation. Without the visa the contract isn't valid and the employer risks a fine.
If you run a foreign company with no local entity, an Employer of Record in Morocco can hire the person on your behalf. The provider becomes the Moroccan employer, which changes who files the paperwork (confirm that with the provider before you sign anything).
Can a foreigner legally work in Morocco, and what does a work permit Morocco look like?
Yes, but not freely. The Labour Code (law 65-99) applies to foreigners as it does to Moroccans, with one extra layer: article 516 requires the employer to obtain authorisation from the labour authority, granted as a visa stamped on the contract, according to the summary published by the law firm CMS Law.
So the worker doesn't apply for a personal work permit in the way a European would picture one. The visa attaches to the contract, and the employer asks for it. The contract also has to follow the model set by order 1356-19 of 19 April 2019, per the 2020 guide to recruiting foreign employees published by Spain's labour ministry.
The idea behind it is national preference. The administration wants to be sure no suitable Moroccan candidate is available, or that the post meets a genuine skills need. Plan around it: the contract only takes effect from the date of the visa (source: Upsilon Consulting).
What are the steps to get the contract visa?
There are six steps, and the employer owns most of them: the ANAPEC attestation, filing on the TAECHIR platform, a ministry decision within 10 days of a complete file, then an entry visa, a residence card and CNSS registration. Depending on the source, the total runs from a few weeks to five months.
| Step | Who does it | What the sources say |
|---|---|---|
| ANAPEC attestation | Employer | Job ad published, then an attestation if no suitable Moroccan candidate applies; 20 working days in the 2020 guide, up to about 60 days per Upsilon |
| Filing on TAECHIR | Employer or proxy | Three signed originals on the official contract model, certified diplomas, passport copy, sworn translations |
| Ministry decision | Administration | 10 days maximum from a complete file |
| Entry visa | Employee | Depends on nationality, issued by the consulate in the country of residence |
| Residence card | Employee, with the employer | Issued by the DGSN on presentation of the visaed contract |
| CNSS registration | Employer | From the start of the contract |
Filing goes through TAECHIR. We couldn't open the platform directly (it blocks robots), so the details above come from legal guides and should be checked with the administration. The proxy still hands over the originals in person, according to the 2020 guide.
One thing catches people out: any later change to the contract (pay, duration, employer) needs a new visa. Build that delay into a relocation calendar.
Who is exempt from the ANAPEC attestation?
Several categories skip the search for Moroccan candidates: foreigners born in Morocco and legally resident, spouses of Moroccans, employees of Casablanca Finance City companies, company officers and shareholders, and short-term delegates (up to six months), according to the 2020 guide and Upsilon.
Senior management roles follow a simplified procedure, around 48 hours for the attestation. The category lists change and the two sources don't match on every point, so ask the employer to confirm in writing which category it selected on TAECHIR before you commit.
Fixed term, termination, renewal: what a visaed contract changes
Courts treat a foreign employment contract as a fixed-term contract, even when both sides meant it to be permanent, and these contracts usually run one or two years (Jeune Afrique, interview with a lawyer from the firm LPA). Renewal therefore means a new filing.
In practice, per CMS Law's summary of case law, ending the contract early without serious misconduct leads to damages equal to the salaries still due, with no notice period or severance in the usual sense. That's a long way from a standard Moroccan open-ended contract, which our guide to the employment contract in Morocco walks through.
If the visa expires and isn't renewed, anyone who keeps working is in an irregular situation. That date matters more than the residence card expiry.
Residence card, CNSS and tax: what follows the visa
Once the contract is visaed, three obligations follow: the residence card from the DGSN, CNSS and AMO registration from day one, then income tax withheld monthly at source by the employer. Upsilon notes that a bilateral social security agreement can exempt the employee from contributing in Morocco.
Tax residence comes down to a permanent home, the centre of economic interests, or a stay of more than 183 days in any 365 (Upsilon). Rates for contributions and tax change from year to year, so ask the employer which scale applies to your payslip before you sign.
How long does a work permit Morocco process take?
Budget three to five months for the whole route, according to Upsilon, which is a high estimate covering the ANAPEC attestation, the entry visa and the residence card. Other guides quote far shorter times, a few weeks, when the file is complete and the employer knows the procedure.
Order matters more than duration. The ANAPEC attestation comes before filing, filing comes before the ministry decision, and the entry visa (two to four weeks per Upsilon, at the Moroccan consulate in the country of residence) follows the contract visa in the route it describes. An employer promising you an arrival date in two weeks, with no attestation requested yet, deserves a few questions.
What happens if you work without the contract visa?
The employer faces a fine of 2,000 to 5,000 dirhams per non-visaed contract (article 521, per CMS Law and Upsilon), and case law treats a contract without a visa as void. The worker can't lawfully work or stay on that basis.
If authorisation is refused, the model contract puts the cost of the employee's return home on the employer (article 518, per the 2020 guide). A careful employer prepares the file before the person arrives, not after.
What does this mean for you, in practice?
Three situations come up again and again. Employee of a Moroccan company: your future employer files everything, you supply diplomas, passport and translations. Foreign company recruiting with no local entity: an Employer of Record carries the contract on the Moroccan side. Independent: the contract visa doesn't apply to you, but a valid residence permit is still required, as covered in our article on the foreign self-employed in Morocco.
Take Claire, a Lyon engineer hired by a Casablanca SME. She hands over translated diplomas in March, the ANAPEC attestation lands a few weeks later, the contract visa follows in about ten days, and her residence card is started on arrival. Nothing clever, just a calendar that holds. What derails files is almost always a missing document or a translation that isn't sworn.
If you're on the hiring side, the practical question is who the Moroccan employer is. Either a local entity of yours files the contract, or an Employer of Record does. Paying someone from abroad and leaving the question open doesn't make the Moroccan-law side disappear, it just leaves it unanswered. Our guide on how to hire employees in Morocco covers the options. Whichever route you take, the same work permit Morocco rules apply to the person you hire.
Remote work is a different case. Working for a foreign employer from Morocco, without a Moroccan employer, doesn't go through this circuit, and the legal framework is blurrier. We cover it in our guide to working remotely from Morocco for a foreign client.
Before you sign: five checks
- The ANAPEC category the employer chose (attestation or exemption), confirmed in writing.
- The contract drawn up on the official model, in three signed originals.
- Certified diplomas translated by a sworn translator.
- A contract start date aligned with the visa date, not before it.
- A renewal calendar with the visa expiry date in your diary.
Is your company hiring from France, the US or elsewhere and looking to employ someone in Morocco without opening a subsidiary? Tell the WEEPO team about your situation to see whether an Employer of Record fits, and on what timeline.
