Morocco has made significant progress in developing renewable energy, cementing its position as one of the region’s leading countries in this field. By 2024, renewable energy sources accounted for 45% of installed electricity capacity and contributed around 27% of total electricity generation. This strong foundation gives the Kingdom an opportunity to move into a new phase: broadening participation in the energy transition so that the benefits of renewable energy are not limited to large-scale projects but also reach households, farmers, cooperatives, and small and medium-sized enterprises (SMEs).
Morocco has made significant progress in developing renewable energy, cementing its position as one of the region’s leading countries in this field. By 2024, renewable energy sources accounted for 45% of installed electricity capacity and contributed around 27% of total electricity generation. This strong foundation gives the Kingdom an opportunity to move into a new phase: broadening participation in the energy transition so that the benefits of renewable energy are not limited to large-scale projects but also reach households, farmers, cooperatives, and small and medium-sized enterprises (SMEs).

Decentralized renewable energy generation, particularly through solar panels installed on homes, shops, farms, and other premises, can play a pivotal role in this next phase. It enables electricity to be generated close to where it is consumed and gives citizens and economic actors an opportunity to reduce their electricity bills and participate directly in the energy system. It can also help Morocco reduce its heavy dependence on fossil fuel imports, limit its exposure to fluctuations in global prices, and support its goal of increasing renewable energy to 52% of installed electricity capacity by 2030.

Benefits for People, the Economy, and the Electricity System

For households, self-generation can reduce electricity bills and transform consumers from mere recipients of a service into partners in clean energy generation. However, this investment becomes viable for a larger number of households when they are able to sell all their surplus electricity at a fair and transparent price, allowing them to recover the cost of their solar panels within a reasonable period.

For farmers and cooperatives, decentralized solar energy can reduce the cost of operating irrigation pumps, cold-storage facilities, and other equipment, while helping protect agricultural production and improve its quality. Businesses and shops, meanwhile, can better manage their electricity costs and strengthen their competitiveness and resilience to price fluctuations and power outages.

The national economy also stands to benefit. Decentralized generation relies primarily on investment by households and businesses and can therefore add renewable energy capacity without requiring the state alone to bear the cost of massive centralized projects or take on substantial loans and financial guarantees. It also creates a local market for design, installation, maintenance, and engineering services, distributing employment opportunities across cities and rural areas. When electricity is generated close to where it is consumed, losses from long-distance transmission are also reduced, while grid capacity is freed up to meet growing demand and connect new areas or projects.

This system also creates opportunities for banks and financial institutions to develop financing products tailored to households, farmers, and small businesses. But financing requires clear rules and predictable returns: the clearer the right to sell surplus electricity, the fairer the tariff, and the simpler the grid-connection procedures, the lower the investment risk and the easier these projects become to finance.

From Regulating Self-Generation to Encouraging Generation and Sale

The Moroccan government has recognized the importance of this shift. In June 2022, the Minister of Energy Transition and Sustainable Development explained that the spirit of Law 82.21 is based on decentralized generation, with the aim of giving consumers the right to generate their own energy and feed it into the grid, and ultimately to become producers themselves. This vision reflects what Morocco actually needs: a framework that does not merely permit self-consumption, but also encourages renewable electricity generation and the sale of surplus power.

Law 82.21 was enacted in February 2023, establishing a legal framework for electricity self-generation, regardless of the energy source, voltage level, or installation capacity. This represented an important positive step, as the law defined the rights and obligations of the different parties and opened the way for self-generators to connect to the grid. It provides for different procedures depending on the size of the installation and how it is connected, ranging from a declaration for small-scale capacity to connection approval or authorization for larger projects.

However, Article 1 of the law limits its objective to the “regulation” of self-generation, whereas the next phase requires explicitly making the promotion of self-generation an objective as well. Some of the current provisions make the framework closer to a model focused solely on self-consumption and do not yet provide the conditions needed to enable households, farmers, and small businesses to become viable producers and suppliers of electricity on fair terms.

Where Do Restrictions on Selling Electricity Remain?

The most significant restriction is the cap on the sale of surplus electricity. Article 12 allows self-generators to sell no more than 20% of their annual generation to the relevant grid operator. This cap does not necessarily limit the amount of electricity that can be fed into the grid, but rather the amount for which the producer can receive payment. As a result, the grid may benefit from clean electricity whose generation was financed by a household or business without the owner being compensated for the full amount of electricity supplied.

This restriction weakens the economic viability of solar panels, particularly for households with moderate electricity consumption. Higher-income households with greater electricity consumption, by contrast, can consume a larger share of the electricity they generate directly and can therefore recover their investment more easily. In this way, the cap risks concentrating the benefits among those with greater financial means rather than making them widely accessible, which runs counter to a just energy transition that enables all segments of society to participate.

The impact of this cap is compounded by the absence of a clear and fair tariff for purchasing surplus electricity fed into low-voltage grids. It is difficult for a household, farmer, or business to make an investment decision or secure financing without knowing how much it will receive for the electricity it supplies to the grid. The tariff should neither be merely symbolic nor benefit only those with high levels of electricity consumption. Rather, it should provide a reasonable return for different types of self-generators while taking grid costs into account.

Administrative and technical procedures also stand in the way of wider uptake. The threshold separating the declaration regime from the grid-connection approval regime is set at 11 kW, which is low for a multi-unit residential building or a farm that needs to operate a cold-storage facility. Exceeding this threshold may subject a project to documentation, studies, and procedures that are more complex than an ordinary citizen or small business can reasonably manage.

The framework also needs to address potential conflicts of interest when the distribution grid operator, whose electricity sales may be affected by increased self-generation, is responsible for reviewing grid-connection applications. Moreover, with more than a quarter of the law’s provisions devoted to violations and penalties, and with some fines set at high levels, the law risks sending a punitive message rather than building trust and encouraging participation. Restrictions intended to protect the grid should remain tied to transparent and demonstrable technical considerations rather than becoming general barriers to decentralized generation.

How Can Law 82.21 Be Reformed and Its Implementation Improved?

Reform should begin by changing the law’s underlying objective: from merely regulating self-generation to actively promoting and expanding it, while recognizing consumers as potential producers and suppliers of electricity. This requires a coherent package of reforms:

·Remove the 20% cap on the sale of surplus generation and ensure that self-generators are compensated for all the electricity they actually feed into the grid and from which the grid benefits. Grid stability requirements can be addressed through clear technical rules, or through curtailment when necessary, rather than by taking a share of the electricity without compensation.

·Accelerate the adoption of a fair and transparent tariff for surplus electricity fed into low-voltage grids. The tariff should strike a balance between providing self-generators with a reasonable return and covering grid operating costs. It should also be sufficiently clear to enable households, businesses, and banks to assess and finance investments.

·Raise the 11 kW threshold to a level that reflects practical needs, so that multi-unit residential buildings, farms, and small businesses can benefit from simplified procedures whenever their installations pose no technical risk to the grid.

·Simplify and standardize procedures for project development, grid connection, and operation for projects subject to the declaration regime, and reduce required documentation and studies to what is strictly necessary. Response deadlines should also be respected, with failure to respond within the prescribed timeframe deemed implicit approval.

·Assign the processing of declarations and grid-connection applications, as well as the monitoring of response deadlines, to an entity independent of distribution grid operators, or at a minimum subject these processes to independent regulatory oversight, so that decisions are made according to objective technical and legal criteria.

·Restore the balance between incentives and penalties within the law and reduce fines so that they are proportionate to the nature of the violations. Provisions on generation curtailment should be moved from the section on penalties to the technical provisions, since curtailment is a temporary grid-management measure rather than a violation committed by the self-generator.

·Complete the necessary regulatory texts and instruments, including the distribution grid code and rules governing storage and the metering of electricity generated, consumed, and fed into the grid. Grid rules should also be updated to accommodate two-way electricity flows as self-generation becomes more widespread.

·Limit the use of smart meters to disconnect generation to cases where this is technically necessary for grid safety and stability, clearly distinguishing such cases from penalties, while protecting personal data and collecting only the information necessary for grid operation.

An Opportunity to Expand the Benefits of the Energy Transition Fairly

Removing the 20% cap is a key priority, but it will not achieve its full impact without a fair tariff, simple procedures, independent oversight, and a complete set of technical rules. When these reforms work together, Law 82.21 can evolve from a framework that regulates self-consumption into a tool that incentivizes renewable electricity generation and sales and broadens participation in the energy transition.

Morocco has already made significant progress in renewable energy, building on a strong foundation of projects and institutional expertise, substantial solar and wind potential, and a clear orientation toward decentralized generation. These achievements provide an opportunity to move into a new phase that broadens the reach of this success by enabling citizens, farmers, cooperatives, and businesses to participate meaningfully in energy generation and benefit from its rewards. Reforming Law 82.21 can support this next step, contributing to a more efficient and resilient electricity system and a more just energy transition whose benefits are shared more widely.

Be Part of the Solution

As a policy actor and influencer, sign now to support the development of Law 82.21.

Join Now!