Le Noyer A, No. 23, 2nd floor, Ibn Sina, Guéliz, Marrakech +212 6 61 05 74 55 · +212 6 20 89 76 60 · sigma.icc@gmail.com
Home / Advice / Electrical / Solar and Law 82-21

Solar panels for self-consumption: what Law 82-21 changes

Since the implementing decree of Law 82-21 came into force, private individuals can connect their solar panels to the grid within a defined framework. Here are the rules, the procedures and how to size a cost-effective installation.

Published 16 November 2026 · 6 min read · SIGMA ICC, engineering consultancy

Law no. 82-21 on self-generation of electricity allows you to produce your own electricity while remaining connected to the grid. Its implementing decree, decree no. 2-25-100, was published in the Official Bulletin of 9 March 2026, with entry into force announced for 9 June 2026. For a house, the most frequent case is simple: an installation of less than 11 kW connected to the low-voltage grid falls under a declaration regime with the distribution network operator. The aim remains to consume most of your production yourself, because the sale of surplus is capped.

The three regimes by power

Power and connectionRegimeContact
Installation not connected to the grid (off-grid site), whatever the powerDeclarationAccording to the decree
Less than 11 kW, connected at low voltageDeclarationDistribution network operator (municipal utility, concession company or ONEE depending on the city)
From 11 kW to 5 MWConnection approvalThe relevant network operator
Above 5 MWAuthorisationAdministration or ONEE depending on the source: check the text

The published commentaries on the decree do not all agree on the details (competent authority for large installations, response times). For a specific project, the reference remains the text published in the Official Bulletin and your distributor's practical procedures.

Selling the surplus: possible but limited

The law caps the sale of surplus at 20% of annual production. An ANRE decision (no. 04/26) sets a feed-in tariff of 21 dirham centimes per kWh at peak times and 18 centimes at off-peak times; according to the law firm Fidal, this tariff applies to installations connected at medium and high voltage, with the low-voltage tariff still to be specified. Compared with the purchase price of a residential kWh, this tariff is low: every kWh you consume yourself is worth much more than a kWh sold. According to the press, a text intended to revise the 20% cap was still awaited.

Sizing an installation for a villa

  • Start from daytime consumption: air conditioning, pool pump, electric water heater, programmed appliances. In Marrakech, the summer air conditioning peak coincides with solar production, which favours self-consumption.
  • Aim for a high self-consumption rate rather than the largest possible power: an oversized installation feeds a lot into the grid for little income.
  • Schedule usage: pool filtration, washing machine, vehicle charging and water heater in the middle of the day.
  • Batteries: they increase autonomy but significantly lengthen the payback period.
  • Flat roof: check the permissible load, waterproofing at the fixings and shading (parapets, stairwells, antennas).

Indicative prices in Morocco

A 2026 Moroccan guide gives an order of magnitude of about 10,000 DH per kWp installed for a turnkey grid-connected installation, i.e. 45,000 to 65,000 DH for 5 kWp. 5 kW kits (panels and inverter, without installation or mounting structure) are advertised online at roughly 34,000 to 53,000 DH depending on the brand and whether they are single-phase or three-phase. Indicative prices, to be compared on detailed quotes including the structure, wiring, protective devices and paperwork.

Electrical safety. A photovoltaic installation includes a direct-current section, at high voltages, which cannot be switched off like an ordinary circuit. It requires dedicated protection (isolators, surge protectors on the DC and AC sides, see the surge protector), proper earthing of the structures and an inverter that disconnects automatically in the event of a grid outage.

The role of the design office

The design office analyses consumption, sizes the useful power, checks the roof and the existing board, draws up the diagrams needed for the declaration or connection application and inspects the installation work. Solar is also one of the levers for reducing a villa's electricity bill.

Frequently asked questions

Do you need authorisation to install solar panels at home in Morocco?

For an installation of less than 11 kW connected to the low-voltage grid, decree 2-25-100 provides for a simple declaration regime with the distribution network operator.

Can you sell your solar electricity in Morocco?

Yes, but Law 82-21 caps the sale of surplus at 20% of annual production, at a tariff well below the purchase price of a kWh: the benefit lies in consuming your own production.

How much does a 5 kWp solar installation cost in Morocco?

A 2026 Moroccan guide estimates it at between 45,000 and 65,000 DH turnkey, i.e. about 10,000 DH per kWp. Indicative prices, to be confirmed by quote.

A project in the pipeline?

SIGMA ICC designs reinforced concrete, electrical, plumbing and HVAC systems and supervises sites for villas, riads, hotels and shops.

Sources : ANRE, loi n° 82-21 relative à l'autoproduction · Fidal, décret d'application et tarif de cession · Médias24, le Maroc débloque l'autoproduction · Olam Company, panneaux solaires pour villa au Maroc.

Can we help you?

Click to call, or write to us: we answer 7 days a week for emergencies.

Chat on WhatsApp