(Bloomberg) -- Spain approved rules to cap natural gas prices, the most radical effort yet by a European government to contain the rally in energy costs sparked by the war in Ukraine. 

The announcement puts an end to weeks of back-and-forth between Madrid and the European Union on the plan. Portugal is expected to green-light similar rules later today.

The plans mark a milestone in European electricity integration by giving the two Iberian nations permission to act outside the EU’s common-market rules and intervene in price setting. The bloc is racing to tame soaring inflation, driven in large part by energy prices that jumped to record levels following the war’s outbreak.

The European Commission, the EU’s executive arm, had previously granted Spain and Portugal permission to cap the price of gas used in power generation at an average of 50 euros per megawatt-hour for one year. However, implementation was delayed as leaders hashed out the details of how the system will work and who will foot the bill.

Surging Prices

Under the current system, the most expensive energy source used to generate power sets the wholesale market price for the day. That’s currently gas, even though it’s used for less than a third of all generation in Spain and even less in Portugal.

While European gas prices have retreated from the record levels reached in the early weeks of the war in Ukraine, they still remain elevated. The benchmark contract is currently trading near 100 euros per megawatt-hour -- about four times the level a year ago.

When prices are high or volatile, the system is expensive for intensive industrial users. In addition, about a third of Spain’s retail consumers pay the top price regardless of what type of electricity they use, because their power contracts are indexed to wholesale prices. 

The agreement to cap prices carries far more weight for Spain than for Portugal, where gas prices only impact a small amount of consumers. Each country can set up its on framework for how the cap will work. 

Spain’s Prime Minister, Pedro Sanchez, initially tried to gain support from leaders across Europe to overhaul the entire European wholesale market framework, arguing that it was set up at a time when renewable energy was not a factor. 

Energy ‘Island’

Those diplomatic efforts ultimately failed. In the end, Sanchez settled for a temporary agreement that would grant Spain and Portugal an exception on the basis that the Iberian peninsula has limited connections to the rest of the European power grid, and can therefore be considered an “energy island.”

The initiative has faced significant push-back from several northern European governments, as well as from a group of utilities, including Iberdrola SA, Spain’s largest. Iberdrola has said that any price caps should be applied across Europe, and that allowing two countries to act alone risks undermining the common market.  

The Spanish government sees the caps as the easiest way to put a lid on inflation, which was at 8.3% in April -- a drop from March but still near historically high levels. 

©2022 Bloomberg L.P.