At a meeting of the Council of Ministers on Tuesday the government approved a Royal Decree-Law of measures that are aimed at reducing the cost of electricity for consumers by 22% by the end of the year.

Prime Minister Pedro Sánchez said that the aim will ensure that the average price paid by a consumer in 2021 is equivalent to that paid three years ago in 2018.

Despite protests across Spain throughout the summer prices have soared to record levels this month with the left-wing government now agreeing emergency measures to cut the country’s spiralling energy bills.

The Minister Teresa Ribera said that she recognised the need to respond to the extraordinary situation generated by the record prices of the wholesale electricity market in Spain and across the European Union, and, “Although the main variables that determine the prices are beyond the control of governments, we have focused attention on what we can do, on the most important issues of the electricity bill “.

The price of electricity is now almost four times the figure registered one year ago

On Monday, the cost of electricity in Spain, the highest in Europe, reached €154.16 per megawatt-hour (MWh), the highest ever recorded, and with reports of a record high of €172.8 per megawatt hour for Wednesday, 12.6% up on Tuesday, almost four times the figure registered one year ago, when it was just €46.

The minister said that these energy companies must contribute part of their extraordinary benefits, at least during this exceptional situation, so she aims to channel €2.6bn (£1.9bn; $3bn) in energy company profits to consumers and slash electricity taxes over the winter months.

Windfall gains for energy firms will be redirected to consumers and the payment of infrastructure until next April.

Spain will raise additional funds by selling off a further €900m in carbon emissions permits this year, on top of the existing €1.1bn

There will also be price caps on natural gas which mean bills for 10.5m households will go up by around 4.4% instead of an estimated 28%.

The plan to target utility firms hit shares in Endesa in particular, which slumped 5.1% on Tuesday.