By Ben Shore
BBC News, Sofia
Bulgarians have spent three days with no gas in the midst of a bitter chill
It looks as if there's light at the end of a very dark - and cold - tunnel for Bulgaria, one of the countries worst affected by the gas dispute between Russia and Ukraine.
A deal brokered by the EU appears to have made a resumption of supplies likely in the near future.
Meanwhile the Ukrainians have said Bulgaria will be the first to get gas when deliveries do start up.
Having been completely starved of supplies for three days, the news will be welcomed in Sofia.
But the political fallout from the crisis will be significant.
Bulgarians are determined never to be put in such a humiliating situation again.
On Thursday, the crisis became so severe the ministry of energy issued an "austerity ordinance" which made major cuts to usage of natural gas to keep essential services like hospitals and schools open.
This in a fully-fledged member of the European Union.
Not surprisingly, the Bulgarian public is deeply unimpressed by their politicians.
Press reports have surfaced suggesting the government was warned by the Russians in the middle of December that there could be a disruption in gas supplies, yet no action appears to have been taken.
When the cuts started, President Purvanov raised the possibility of reopening a disused nuclear reactor. It didn't get much further than that as everyone knew the EU would veto the plan.
The Dnevnik newspaper said: "Even people whose IQ equals the temperature of a radiator heated with Russian gas... had their doubts about the idea."
And a final accusation levelled at the government is why, after a similar but less serious disruption in 2006, did the government not take steps to organise another supply route?
It has now, announcing that EU money would be used to connect Bulgaria to the Turkey-Greece-Italy network.
EU in crosshairs
That European money may well prevent a similar shortage in the future but the role of the EU in this crisis will also come under scrutiny.
Thursday's "austerity ordinance" cuts gas to all but emergency services
On Monday, as events began to spiral out of control, the Commission's energy spokesman and the Czech presidency kept repeating the same mantra - that the dispute between Russia and Ukraine was commercial, not political, and the EU would not mediate.
But by Thursday, the EU was furiously negotiating with both sides for a political deal to get gas flowing again.
Juliana Nikolova, the director of the European Institute think tank in Bulgaria, is not shy about criticising her own government, but makes it quite clear as well that "the EU was late".
Bulgaria joined the EU to escape the label of a "Second World" country. It wanted to establish civil norms and grow into a thriving economy.
EU membership was supposed to boost influence on world affairs, and improve the lot of its citizens.
So while it is true that, since supplies were cut, the European Union has made Bulgaria's plight a priority, there is a perception that it could have acted earlier on behalf of one of its newest and poorest members.