Setting up your workstation in Morocco while remaining employed by, or contracted to, a foreign company seems simple. In practice, cross-border remote work touches residence, tax and social security, and no single answer fits everyone. This article lays out the questions to examine, without promising any outcome.
Where the Moroccan legal framework stands
According to the business press, Morocco’s Labour Code has no specific regime for remote work. Texts on this subject are circulating; the exact stage of adoption and the final content must be checked in official publications before you rely on them. For an employee of a Moroccan company, the practical rules today come mostly from the employment contract, an amendment or an internal policy.
Residence: the general rule
- A stay of under three months falls under the visitor regime, depending on nationality.
- Beyond three months, a residence permit is in principle required (Law 02-03, DGSN).
- The permit depends on the reason for staying, and working for a foreign employer does not necessarily match a recognised reason. Ask the competent services whether a suitable arrangement exists for your case; do not infer anything from a blog page.
Tax: tax residence
According to specialist sources, a person is generally treated as a Moroccan tax resident if they stay more than 183 days in the year, or if their home or centre of interests is there. This may lead to taxation in Morocco, and a tax treaty with your country may allocate taxing rights. The question also concerns your former country: leaving a country does not always end the tax residence attached to it. Individual advice is very useful here.
Social security and the foreign employer
- The place where you physically work often determines the applicable scheme, unless a rule or agreement says otherwise.
- Between France and Morocco, the 2007 agreement provides for secondment for an assignment decided by the employer; an employee simply choosing to move to Morocco does not necessarily fall within it.
- For the foreign employer, an employee abroad may raise issues of local labour law, contributions and tax presence. Many companies require prior written approval.
Practical tips
- Get your employer’s written agreement before leaving.
- Ask which contract, which law and which social security will apply.
- Check your health cover outside your home country.
- Keep records of dates and places of work.
- If you are self-employed, check where your clients and activity are located.
Key takeaways
- Remote work has no confirmed specific framework in Morocco’s Labour Code to date; a reform has been announced.
- Residence, tax residency and social security are three separate issues.
- Your employer’s written agreement is essential.
- Every situation differs: get advice.
This article is for information only and is not legal or tax advice; rules change, so check them with the competent authorities.
Go further with WEEPO
WEEPO Maroc supports freelancers, consultants and foreign companies in Morocco: auto-entrepreneur status, salary portage and Employer of Record (EOR), with free tools.

