What does Morocco’s self-generation law 82-21 allow?

Law 82-21 allows a company in Morocco to generate electricity exclusively for its own consumption, whatever the source, grid, voltage level or capacity. It is not a licence to sell power: the electricity serves the plant first, and only a limited surplus may flow to the grid.

Law 82-21 on self-generation of electricity was promulgated by Dahir 1-23-21 of 10 February 2023 and published in Arabic in Official Bulletin No. 7173 of 27 February 2023. It entered into force three months later, on 27 May 2023, with a proviso that froze the market for three years: provisions that refer to an implementing text only apply once that text is published (Article 36). The capacity thresholds and procedures depended on a decree.

Two definitions from Article 2 are enough to follow the rest:

  • Self-generator: a natural or legal person, under public or private law, that generates electricity exclusively for its own consumption and owns the installation or has the right to use it. Excluded, in particular, are the grid operators, the national utility ONEE (except to supply its desalination plants), the Moroccan Agency for Sustainable Energy (MASEN) and producers licensed under Law 13-09 on renewable energy.
  • Surplus: electricity generated, not consumed, and injected into the national grid.

For a manufacturer, self-generation is a lever to cut electricity-related emissions and control energy bills, alongside the other levers in our guide to industrial decarbonisation in Morocco.

Where do the implementing texts of Law 82-21 stand?

The core text is published and in force: Decree 2-25-100 of 5 March 2026 setting the conditions and procedures for building and operating self-generation installations, published in Arabic in Official Bulletin No. 7489 of 9 March 2026 (pages 1537 to 1544). Under its Article 29, it entered into force three months after publication, on 9 June 2026.

Text

Subject

Publication

Applies from

Law 82-21

Self-generation framework

Official Bulletin No. 7173 of 27 February 2023 (Arabic)

27 May 2023, except provisions awaiting a text

Decree 2-24-761 of 22 October 2024

Certificate of origin of renewable electricity (Article 16 of Law 82-21, Article 6 bis of Law 13-09)

Official Bulletin No. 7352 of 14 November 2024 (Arabic); official French translation in No. 7506 of 7 May 2026

Twelve months after publication, on 14 November 2025

Decree 2-25-100 of 5 March 2026

Thresholds, files and time limits of the three regimes

Official Bulletin No. 7489 of 9 March 2026 (Arabic)

9 June 2026

Orders of the minister in charge of energy

Declaration and application forms, opening of the online platform

Not published as of 11 November 2026

—

Texts on storage, revision of the 20% cap and curtailment

Articles 12, 15 and 32 of the law

Not published as of 11 November 2026

—

We read the general editions of the Official Bulletin posted online up to issue No. 7559 of 9 November 2026 and found no other text adopted under Law 82-21: neither the orders setting the forms and the opening of the online platform (Article 25 of the decree), nor any text on storage, revision of the 20% cap or curtailment. The law itself sets a deadline: the necessary regulations must be issued within four years of its publication, that is by 27 February 2027 (Article 36). No French translation of Decree 2-25-100 has appeared in the Official Bulletin (checked up to issue No. 7554 bis of the official translation edition), so files are prepared on the Arabic text.

Which regime applies: declaration, grid-connection approval or authorisation?

The regime depends on capacity and on the grid. An off-grid installation needs a declaration; a grid-connected one changes regime at 11 kW and again at 5 MW.

Situation

Regime

Where to file

Response time

Generation and consumption not connected to the national grid

Declaration to build, then to operate

Regional services of the ministry in charge of energy

Receipt within one month of a complete file

Below 11 kW, low voltage

Declaration to build, then to operate

Distribution system operator

Receipt within 30 days, excluding the hosting-capacity check (15 days at most)

From 11 kW to 5 MW, low or medium voltage

Grid-connection approval to build, then to operate

Distribution system operator

30 days after a complete file, excluding hosting capacity and technical study; one month for operation

5 MW and above, medium, high or very high voltage

Authorisation to build, then to operate

Regional services of the ministry in charge of energy, after the grid operator’s technical opinion

30 days after a complete file, excluding hosting capacity (30 days at most), opinions and technical study

Two rules prevent bad surprises. A site’s capacity adds up every installation on it (Article 11 of the law): three 2 MW rooftops on the same plant make a 6 MW project, hence an authorisation. And any change to an application counts as a new application with a new filing date (Article 8): changing the capacity during review costs you your place.

Carrying electricity from a generation site to a separate consumption site is only possible under the authorisation regime, from 5 MW (Article 7 of the law), with the approval of the transmission system operator, that of the distribution operator at medium voltage, and a grid access contract. The capacity that separates medium-voltage from high-voltage access must be set by regulation. Decree 2-25-100 does not set this threshold, and as of 11 November 2026 no text published in the Official Bulletin has set it: for a project that carries electricity to another site, the voltage level is settled with the transmission system operator and the decentralised services of the ministry in charge of energy.

How does the procedure work, from file to operating obligations?

In two stages: one application to build, then one to operate, each against a receipt. In between, the grid operator reserves hosting capacity and, from 11 kW, carries out a technical study at the applicant’s expense.

The construction file

For a grid-connection approval or an authorisation, Decree 2-25-100 requires:

  • the applicant’s identity, title to or right to use the land, and a commitment to use the output for its own needs and not transfer it to a third party;
  • the identity of the company building the installation and a commitment to pay for the technical study;
  • the connection diagram, site layout, site coordinates, equipment specifications with their manufacturer, and the works schedule;
  • annual electricity consumption over the last three years, or forecast consumption over the next three for a new connection or an increase in the quantities drawn under the supply contract;
  • an environmental impact study, where the legislation requires one.

Hosting capacity, technical study and works

Hosting capacity is reserved in the date-and-time order of complete files (Article 14 of the law). If none is available, the file is kept and the applicant is told as soon as capacity frees up. An incomplete file must be completed within 30 days or it is returned (Article 24 of the decree). Each year ANRE publishes hosting capacity before 31 January, based on data that distribution operators send by 30 November (Article 23 of the law).

The technical study checks the installation’s compliance, prices the connection works and assesses the effect of injection on the grid. The applicant pays for it within 10 days or the file is returned; the operator completes it in three months, extendable by 30 days (Article 27 of the decree). The reservation becomes final when the connection agreement is signed.

Works must be finished within 12 months of the receipt for a declaration, and within two years of signing the connection agreement for an approval or authorisation, extendable by one year at most in exceptional circumstances. A formal notice left unanswered, for three months at most, voids the title. Below 5 MW, the operating application is filed within one month of completing the works; for a grid-connected installation it includes a certificate of compliance from a body approved under Article 12 of Law 13-09, dated photos and, from 11 kW, an insurance certificate. Filings will move to an online platform whose opening date an order will set (Article 25 of the decree).

After commissioning: obligations and penalties

Any change to an element of the title requires prior approval (Article 9 of the law), and shutting down the installation must be notified (Article 28 of the decree). A breach triggers a formal notice of 15 working days before the approval or authorisation is withdrawn (Articles 17 and 23 of the decree).

Breach

Penalty under Law 82-21

Building, operating or increasing capacity without the required declaration

Fine of MAD 2,000 to MAD 5,000 (Article 28)

Building, operating or increasing capacity without grid-connection approval or authorisation

Fine of MAD 100,000 to MAD 1,000,000 (Article 29)

Modifying the installation without prior approval

Fine of MAD 100,000 to MAD 1,000,000 (Article 30)

Obstructing inspectors or refusing to hand over documents

Fine of MAD 10,000 to MAD 100,000 (Article 31)

Failing to comply after formal notice

Order to stop operating, then withdrawal of the authorisation three months later (Articles 25 and 27)

Installations that predate the law had to apply for regularisation within 18 months of its entry into force (Article 33). Decree 2-25-100 contains no transitional provision for these installations, and as of 11 November 2026 no text published in the Official Bulletin specifies how those that could not file without the decree are treated: an operator in this situation should obtain the written position of the decentralised services of the ministry in charge of energy before filing.

What can you do with surplus power, the grid and storage?

A self-generator may sell to the grid operator a surplus of up to 20% of its annual output, at the tariff set by ANRE (Article 12 of the law). That cap drives sizing: a plant is sized on consumption, not on available roof or land.

  • Contribution: a grid-connected self-generator pays, on top of the grid-use tariff, a contribution for system and distribution services set by ANRE (Article 13).
  • Metering: each connected installation gets a smart meter, installed only by the grid operator, showing power drawn and injected in real time (Articles 18 and 19).
  • Supply contract: the operator may not cut off a customer because it self-generates, nor refuse a change to its supply contract (Article 10).
  • Curtailment: the transmission system operator may reduce injection up to a regulatory threshold, without compensation (Article 32).
  • Storage: the law allows storage under regulatory conditions (Article 15) that have not been published; a project with batteries must allow for this.

The 20% cap may be revised at the self-generator’s request, under regulatory conditions that also remain to be published.

How does self-generation cut your carbon footprint and help with buyers?

Electricity generated and consumed in your own installation is not purchased: under the GHG Protocol Scope 2 Guidance (2015), it falls outside scope 2, and any generation emissions belong in scope 1, with zero combustion emissions for solar or wind. The guidance is under revision; no new edition has been published.

The certificate of origin under Decree 2-24-761 provides the evidence. It is requested on the « Registre national des certificats d’origine » (national register of certificates of origin) platform within five months of the end of the production period, for at least 1 megawatt-hour produced over one month at most (five months if output stays below that threshold). The file includes the installation’s title, output and surplus exported per site, and a report by an approved body after a site visit, valid for 3 years. The administration decides within 60 days; the certificate is valid for 12 months.

For exporters, the benefit goes beyond the carbon footprint:

  • EU CBAM: for cement and fertilisers, the EU Carbon Border Adjustment Mechanism also counts indirect emissions from electricity. Documented self-generated power lowers the embedded emissions your importer declares when it uses your actual values: see the CBAM definitive period.
  • Buyer questionnaires: the renewable share of electricity keeps coming up in European buyers’ questionnaires; the certificate and meter readings answer it.
  • Claims: a « made with renewable electricity » statement aimed at European consumers must be accurate and substantiated; see EU Directive 2024/825.

The calculation follows your inventory method, ISO 14064-1:2018 or the GHG Protocol: see carbon footprint under ISO 14064.

What should you do now to prepare a self-generation project?

Start from consumption, not from panels: the 20% cap and the first-come queue reward a well-sized project and a file that is complete the first time.

  1. By the end of 2026: gather bills and load curves for three years and run an energy review; sites subject to Morocco’s mandatory energy audit should follow our guide to mandatory energy audit preparation.
  2. Before sizing: deal with savings first (compressed air, steam, refrigeration, motors), then size the plant on reduced consumption without exceeding 20% annual surplus.
  3. Pick the regime: add up all installations on site, check the voltage level, identify the authority.
  4. File a complete application: it sets your place in the hosting-capacity queue.
  5. Pay for the technical study within 10 days, then sign the connection agreement.
  6. Schedule works and the compliance certificate within the 12-month or two-year deadline.
  7. After commissioning: request certificates of origin within five months of each period and include the output in your carbon footprint.
  8. Before 27 February 2027: watch for the texts on storage and on the 20% cap.

For producers in Morocco and across Africa that export to Europe, this timetable matches their buyers’ own: your 2027 electricity data will feed the CBAM declarations and ESG questionnaires covering that year.