Leaving Morocco in 2026: how to end tax residency and close your files

Moroccan tax residence ends when you drop all 3 tests. No exit tax found; rent (10%/15%), dividends (11.25%) and property gains stay taxed in 2026.
Leaving Morocco in 2026: how to end tax residency and close your files

Quick answer

You stop being a Moroccan tax resident once you no longer have a permanent home or centre of economic interests there and spend 183 days or fewer in any 365-day period. No exit tax on individuals appears in the rules we reviewed. Moroccan rent, dividends and property gains stay taxable in Morocco after you leave.

Last reviewed: November 2026 · Reviewed by Stéphane Gombauld, tax expert, technologist and digital nomad

Heavnn

Stay tax compliant, wherever you work

Answer a few questions and get a clear plan for your own situation.

Check my tax setup →

You have lived in Morocco for a few years and the next chapter is Lisbon, Port Louis or back home. This guide explains when Morocco stops taxing you as a resident, what stays taxable afterwards, and how to close your tax, business and exchange-control files cleanly.

Morocco ceasing tax residency in 2026: the key figures

Item 2026 rule Legal basis
Tests you must stop meeting Permanent home, centre of economic interests, more than 183 days in any 365-day period General Tax Code (Code général des impôts, CGI)
Scope after departure Moroccan-source income only CGI
Rent from a Moroccan property 10% of gross rent below MAD 120,000 a year; 15% at or above CGI
Property sale 20% of the gain, never less than 3% of the sale price CGI
Dividends from a Moroccan company 11.25% withholding on distributions in 2026; 10% from 1 January 2027 CGI, transitional dividend rates
Service fees paid to non-residents 10% withholding; treaties often limit it to royalty-type payments CGI
Dirham banknotes Export banned, except MAD 2,000 per traveller Office des Changes
Reassessment window Four years for income tax CGI

What changed for 2026

  • Dividends: withholding on Moroccan dividends is 11.25% on amounts distributed from 1 January 2026 and 10% from 1 January 2027 (PwC, secondary).
  • Rent: from 1 July 2026, rent paid to companies and to professionals on the net real or simplified regime carries a 5% creditable withholding. Rent received by private landlords stays under the 10% / 15% gross rule.
  • Exchange control: the IGOC 2026 replaced the previous instruction on 1 January 2026.

The residence tests themselves are unchanged for 2026.

Is this guide for you?

Read on if you…

  • are a foreign or Moroccan resident moving abroad this year or next;
  • keep a flat, a company or clients in Morocco and want to know what stays taxable;
  • need to prove to your new country that your Moroccan residence has ended.

Probably not your case if you…

  • were never Moroccan tax resident and only visited;
  • leave for a few months but keep your home and family in Morocco: you will most likely stay resident.

When does Morocco stop treating you as a tax resident?

The CGI makes you resident if you meet any one of three tests. To cease, you must stop meeting all three.

The tests, read in reverse

Test You are still resident if… How to break it
Permanent home You keep a Moroccan home available to you End the lease, sell, or let the property on a genuine long lease
Centre of economic interests Your main business, job or investments stay in Morocco Move your activity and clients abroad
More than 183 days in any 365-day period You exceed 183 days over any rolling 365 days Keep visits short and count across year-ends

Here's the catch. The day count is rolling. If you lived in Morocco all year and leave on 1 September 2026, your trailing 365-day count can stay above 183 into 2027. Morocco can still claim you until it drops.

Dual residence and the treaty

Your new country will usually treat you as resident from arrival. If both countries claim you, the treaty tie-breaker decides: permanent home, then centre of vital interests (where your family and main business are), then habitual abode, then nationality. Morocco has tax treaties with 49 countries plus the Arab Maghreb Union, per PwC (secondary).

The published rules we reviewed do not describe a split-year regime. In practice, your departure date, your new lease and your foreign registration are the evidence that counts.

Does Morocco have an exit tax?

Not for individuals, as far as the rules we reviewed show. Morocco taxes gains when you actually sell, not when you leave. You can move abroad with unrealised gains on shares, crypto or a Moroccan flat without a departure charge.

What does follow you is Moroccan-source income. If you later sell the Moroccan flat, the property gain is taxed in Morocco at that time. Details are in our guide to capital gains tax in Morocco.

What must you file before and after you leave?

The departure-year return

Your departure year is still a Moroccan tax year. Income earned while resident, including foreign income, goes on your Moroccan return.

The CGI has a specific filing rule for taxpayers who leave Morocco, with a deadline earlier than the usual one. We could not confirm the exact lead time on an official page. Ask your DGI tax office (Direction générale des impôts) before you book your flight.

  1. Work out the period. It runs from 1 January to your departure date.
  2. List every income. Salary, professional profits, rent, dividends and foreign income earned as a resident.
  3. File and pay within the DGI's departure rule, then keep the proof of filing.
  4. Employees: salary from one Moroccan employer is taxed at source. Ask for your final payslip and annual salary certificate.

After departure

As a non-resident you declare only Moroccan-source income. Keep a Moroccan address for correspondence or appoint a representative. Remember that the DGI can reassess income tax for four years.

What stays taxable in Morocco after you leave?

Good news: only Moroccan-source income. Foreign income earned after you cease residence is outside Moroccan tax.

Income 2026 treatment for a non-resident
Rent from a Moroccan property 10% of gross rent below MAD 120,000; 15% at or above
Sale of Moroccan property 20% of the gain, minimum 3% of the sale price
Main home exemption Only if the property was your principal residence for at least six years
Dividends from a Moroccan company 11.25% in 2026, 10% from 2027, reduced by treaty where one applies
Interest paid to non-residents 10%, unless a treaty reduces it
Fees for services paid by Moroccan payers 10% withholding; treaties often limit this to royalty-type payments

Your new country may tax the same income too, usually with a credit for the Moroccan tax.

How do you close your Moroccan files?

Think of it as a checklist rather than a single form.

  1. Self-employed? Notify the DGI that you are ceasing your activity and file your final professional return.
  2. Company owner? Decide to keep, sell or liquidate. A Moroccan company stays taxable in Morocco, and its dividends to you carry withholding. Compare structures in our guide to legal forms of business in Morocco and the rates in corporate income taxes in Morocco.
  3. Landlord? Keep declaring Moroccan rent each year.
  4. Tax clearance. Ask the DGI for a certificate of tax compliance. Banks and notaries often ask for one before large transfers or a sale.
  5. Residence card. Keep a copy; it helps prove when your Moroccan residence ended.

How do you move your money out of Morocco?

Morocco keeps exchange controls, run by the Office des Changes. The IGOC 2026 links exchange-control residence to tax residence, so your status changes when you leave.

  • Foreign currency you brought in: non-resident foreigners and Moroccans living abroad may take it out on departure. You declare it to border customs and show the import declaration made on entry (Office des Changes FAQ).
  • Dirham banknotes: export is banned beyond MAD 2,000 per traveller.
  • No emigration allowance: the IGOC does not provide an allowance for residents emigrating abroad (Office des Changes FAQ). Plan transfers through your bank, with documentation of the foreign origin of funds.

Keep every bank foreign-exchange certificate from your Moroccan years. They are the key to a smooth exit.

Your exit plan: before, during and after

Before you leave (2–3 months out)

  • Fix a departure date and confirm the departure-return deadline with the DGI.
  • Give notice on your lease, or let the property on a genuine long lease.
  • Gather bank certificates and investment records.

Departure month

  • File the departure-year return and pay the balance.
  • Close or hand over your professional activity.
  • Move funds through your bank under Office des Changes rules.

After you leave (first year)

  • Keep Moroccan visits short enough to stay at 183 days or fewer on a rolling basis.
  • Declare Moroccan rent and claim treaty rates on dividends.
  • Request a tax residence certificate in your new country.

Example – Omar, 41, software consultant

Omar moves from Casablanca to Lisbon on 1 October 2026 and lets his flat from then on. In 2027, his first full year abroad, the rent is MAD 96,000. Below the MAD 120,000 threshold, Moroccan tax is 10%: MAD 9,600. His Moroccan SARL pays him a MAD 200,000 dividend in May 2027, with 10% withholding: MAD 20,000. Had it been paid in 2026, 11.25% would have cost MAD 22,500. Total Moroccan tax for 2027: MAD 29,600. His Lisbon consulting income is outside Moroccan tax. Portugal may tax the rent and dividend too, with treaty relief.

Omar's exit touched five rules. Yours probably will too.

Get a personalised check of your departure return, company and transfers before you leave.

Check my tax setup →

Common mistakes (and what they cost)

  • Keeping a furnished flat "just in case" → the permanent-home test keeps you resident and Morocco taxes your worldwide income for another year.
  • Leaving before filing → late-filing penalties, and a missing tax clearance when you later sell the flat or move money.
  • Moving money without bank certificates → the bank cannot process the transfer, and the funds stay stuck in dirhams.
  • Running the Moroccan company from abroad without planning → it stays taxable in Morocco, and your new country may claim it under management rules.
  • Forgetting Moroccan rent → undeclared rent can be reassessed for four years, with penalties and interest.

Frequently asked questions

Does Morocco have an exit tax?

Not for individuals, based on the rules we reviewed. Morocco does not tax unrealised gains when you leave. What stays taxable is Moroccan-source income: rent, Moroccan dividends and gains on Moroccan property, which are taxed when you receive or realise them, even as a non-resident.

How do I stop being a tax resident in Morocco?

Stop meeting all three tests in the General Tax Code. Give up your Moroccan home, move your main business and investments abroad, and keep your stays at 183 days or fewer in any 365-day period. Then build evidence: a foreign lease, a foreign tax registration and your travel records.

Will I stay Moroccan tax resident after I leave?

Possibly for a while. The day test runs on any 365-day period, so a late-year departure can keep you above 183 days for several months. You also stay resident if you keep a Moroccan home or your centre of economic interests. A treaty tie-breaker may still assign you to your new country.

How is my Moroccan rental income taxed after I leave?

It stays taxable in Morocco because the property is there. Rent is taxed on the gross amount: 10% if annual gross rent is below MAD 120,000 and 15% at or above. You keep declaring it each year. Your new country may also tax it, usually with a credit for Moroccan tax.

Can I take my savings out of Morocco?

Yes, within exchange-control rules. Non-resident foreigners may take out foreign currency they brought in, with a customs declaration and the entry declaration. Dirham banknotes are limited to MAD 2,000. Larger transfers go through your bank, so keep proof of the foreign origin of your funds.

Do I need a tax clearance certificate to leave?

It is not an exit condition, but it is very useful. Banks and notaries often ask for a certificate of tax compliance before a large transfer or a property sale. Request it from the DGI once your departure-year return is filed and paid.

Sources

This guide is general information, not personalised tax advice. See how we research and review.

Leaving Morocco without loose ends?

Let us plan your departure return, company and transfers in one exit plan.

Start with Heavnn →
About the author
Heavnn

Heavnn

Heavnn is a borderless tax technology solution supporting the future of work. We assist international remote workers with the design and implementation of their global tax setups.

Welcome to Heavnn University!

Access all of our learning resources, blogs, and articles for digital nomads, remote workers, and distributed teams right here on Heavnn University. For more tailored advice, take our digital interview below!

Design Your Global Remote Setup
Heavnn University

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Heavnn University.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.