MADRID (AP) — Spain and Portugal on Friday signed off on a temporary cap on natural gas prices, in a coordinated move described by Portugal’s environment minister as an “unprecedented” bid to temper soaring energy prices and inflation.

As energy prices surge across Europe, exacerbated by Russia’s war in Ukraine, Spain and Portugal joined forces earlier this year to ask the European Union’s executive arm to allow them to skirt the bloc’s common-market rules.

Citing the large amounts of renewable energy used in both countries and their scant connections with the European power grid, the European Commission agreed to allow a price cap on gas used for power generation, averaging around 50 euros ($52) per megawatt-hour for the next 12 months.

Spanish Minister for Ecological Transition Teresa Ribera said the measure would protect consumers and businesses as Europe grapples with volatile energy prices that are driving record inflation.

The cap is expected to immediately reduce costs for a third of domestic consumers and 70% of industry, she added.

“For the first time, it’s not the usual people paying for this,” Ribera said. “The measures adopted are fundamentally aimed at reducing the extraordinary profits of energy companies so that this adjustment benefits all of us.”

She did not provide further details on how the plan would be funded.

In Portugal, Duarte Cordeiro, the minister for the environment and climate action, said the measure would capitalize on “unexpected” windfalls in the system to reduce prices.

“This is an unprecedented measure, a mechanism with a set of very clear goals. Firstly to stop the escalation of prices, secondly to protect those who are more exposed and thirdly, to socialize the costs and benefits.”

The joint plan will now go to European Commission to get the final go-ahead, Ribera added, and was expected to take effect fully in the coming weeks.

Energy companies in Spain have criticized the plan, citing concerns that the new rules will distort the market. José Bogas, the chief executive of Spain’s Endesa, said the cap on prices could result in an increase in gas consumption.

“That is the opposite of what is intended,” he said on a conference call with analysts earlier this week.

In late April, after news broke that the European Commission was considering the proposal from Spain and Portugal, the CEO of Spanish power utility Iberdrola, Ignacio Sánchez Galán, called for the EU to instead seek a common solution. Speaking during an analyst call, he described the idea of an exception for Iberia as “unjustified and contrary to the single market.”

Prices for energy have been steadily climbing in Spain since last year, said Ana Maria Jaller-Makarewicz, an analyst who focuses on Europe for the Institute for Energy Economics and Financial Analysis. “It’s one of the highest prices in Europe … they have to protect consumers.”

It remains to be seen how exactly the cap will ultimately impact energy prices or whether the governments or companies will end up covering the costs of the cap, she added. “It depends on how they manage it now.”

——

AP reporter Helena Alves reported from Lisbon.