MADRID -- Households and businesses across Europe have struggled with high electricity prices for months, though they have fallen since late August peaks.
Electricity costs are intrinsically linked to natural gas prices, which spiked after Russia invaded Ukraine and drastically reduced flows of the fuel used to heat homes, generate power and run factories as the European Union sanctioned Moscow.
Spain and Portugal have managed to free themselves from the EU pricing system and say the benefits are noticeable. It is offering a lesson to the 27-nation bloc as it works this week on ways to temper energy prices going into winter.
While gas prices have fallen recently, helping bring down electricity costs, the winter heating season is ahead and there are uncertainties about supply and how cold it will get.
Here's what to know about what has been dubbed the "Iberian exception" in Spain and Portugal and how it could influence EU discussions:
HOW DOES NATURAL GAS AFFECT ELECTRICITY PRICES?
Across the European Union, electricity prices are dependent on gas-fired power plants to fulfill demand and set prices. Each country's energy sectors -- renewables, coal, nuclear and gas -- contribute what they can to the energy grid throughout the day. Countries try to rely on the energy they produce first but resort to burning imported gas to ensure the electricity demand is met.
Under the system designed in the early 1990s, the price of whichever energy source is most expensive in feeding the grid -- nowadays, natural gas -- is the one that establishes the price for each megawatt of electricity provided by all the sources. The system was designed to favour more cost-efficient technologies.
With prices having soared this year for Russian gas, which Europe relied on heavily before the war in Ukraine, the renewables, nuclear and other electricity generators have made massive financial gains from receiving the same price per megawatt as gas does, driving up the overall price of electricity.
WHY ARE PRICES DIFFERENT IN SPAIN AND PORTUGAL?
In a bid to stem high energy bills for households and businesses, Spain and Portugal joined forces earlier this year to ask the EU's executive arm to allow them to skirt the bloc's rules on how electricity prices are set.
They cited the large amounts of renewable energy they use, scant connections with the European power grid and small reliance on Russian gas.
The European Commission agreed to make an exception and let them alter how the price is reached. Spain gets most of its gas from Algeria, the United States and Nigeria.
HOW DOES THE IBERIAN EXCEPTION WORK?
Spain and Portugal agreed with the commission to separate the price paid for gas used in the energy mix from that paid for the less costly sources like solar, nuclear or hydroelectric power. Under the exception, while gas prices may rise to, say, 100 euros per megawatt, a maximum of around 40 euros is what is paid to providers of less expensive energy sources.
The mechanism is mistakenly referred to as a gas price cap, but in fact, the price paid for gas is not affected. Gas suppliers still get the market rate and gas is still the price-setter.
Industrial engineer and electricity expert Jorge Morales de Labra said the mechanism is more of a cap on the windfall profits of wind, nuclear and other energy providers benefiting from the high cost of natural gas.
WHAT ARE THE SYSTEM'S BENEFITS AND DISADVANTAGES?
Spanish Energy Minister Teresa Ribera says the mechanism has meant savings of 3 billion euros for consumers in its first four months. Prime Minister Pedro Sanchez this week went as far as to say electricity bills in Spain cost 35% less than in Germany and 70% less than in Italy.
Portugal's Prime Minister Antonio Costa said Wednesday that the exception had lowered electricity prices by an average of 18%, compared with expected prices if it had not been enacted.
However, given that Spanish electricity is suddenly cheaper, neighbouring France has started buying it. Portugal also imports Spanish electricity to make up for its drought-caused shortfall in hydroelectric power. This, ironically, has increased Spain's imports of natural gas.
Spain is now burning double the amount of gas for electricity than it did a year ago, experts say, posing a problem for a country committed to sustainability and reducing dependency on fossil fuels.
And companies in Portugal say they are still hurting. The Portuguese Association of Large Electrical Energy Consumers said last month that the exception had only helped "mitigate" prices.
WHAT'S THE REST OF EUROPE DOING?
The EU is struggling to find a way to control electricity prices, but its dependency on imported gas and reluctance to be seen interfering in a free market has been hampering any deal. Proposals on the table at this week's EU summit include a natural gas maximum price bracket, joint gas purchases and a reform of the gas market exchange.
For the moment, there is no plan to discuss extending the Iberian mechanism, but Commission President Ursula von der Leyen says the bloc should study the positive results of the model and whether it could be applied on a European scale.
Experts in Spain say the mechanism is not likely to appeal or benefit all EU countries as it chiefly favours those with a lower dependency on gas imports and a high reliance on sources like renewables, which is not the case in many EU countries.
France, for example, favours decoupling electricity and gas prices as it relies on nuclear plants for about 67% of its electricity -- and on gas for about 7%.
Other countries like Germany, which relies heavily on gas, and Poland, on coal, are not likely to benefit much.
------
Associated Press reporters Raquel Redondo in Madrid and Barry Hatton in Lisbon, Portugal, contributed to this story