European Union members have agreed a plan for dramatic cuts in their use of natural gas in the event that Russia halts its supply to the continent.
Under the deal agreed by the energy ministers in Brussels, member states will reduce their consumption by 15%.
However, the deal has been done on a voluntary basis, rather than the obligation that was originally foreseen by the EU.
That idea met with considerable resistance from a number of national governments, leading to a fresh compromise.
It will become mandatory in the event of a "Union alert", which will have to be agreed by a majority of countries.
The agreement was immediately heralded as a diplomatic triumph, having moved from conception to agreement in relatively rapid time, but the deal also includes a series of exceptions and opt-outs.
These include exemptions for countries whose power grid has little or no connection to the EU's gas pipeline network.
Targets would be reduced for countries who export gas, or whose gas storage facilities are almost full, while certain industries will also be excluded from the rules.
The pattern of exemptions has led some diplomats to question its effectiveness, with one saying that it was "a good idea with no teeth".
However, those doubts were countered by Kadri Simson, the EU's energy commissioner, who said: "Even if all the exemptions were used in full, we could achieve a demand reduction that would help us safely through an average winter."
European nerves have been put on edge by repeated suggestions that Russia would cut the supply that it pumps through the Nord Stream 1 pipeline, which runs into northern Germany.
The pipeline was recently closed for maintenance. It has now reopened but is running below full volume. The supply is due to be reduced yet further on Wednesday.
Russia earns huge amounts of money from Europe for supplying natural gas, but is also aware that it could instigate economic and social problems if it decided to turn off the taps.
Analysis: Nord Stream pipeline uncertainty leaves Germany and Europe staring down barrel of discontent and recession
Germans warned to prepare for possible gas shortage amid Russia's war in Ukraine
As a result, the EU - and particularly Germany - is rapidly trying to wean itself away from dependence on Russian fossil fuels.
Announcing the decision, Czech deputy prime minister Jozef Sikela described it as "a message to the Kremlin", while Germany's Robert Habeck said Russia "will not split us".
In fact, there was one country that opposed the plan.
Hungary, which maintains a strong relationship with Russia and imports 80% of its gas from the country, bemoaned the plan as "unjustifiable, useless, unenforceable and harmful".