Germany will take a 30% equity stake in gas-crunch hit Uniper and Berlin will also provide a combined €14.7bn ($14.93bn) in convertible instruments and loans by state-owned bank KfW as part of a massive rescue package for the Fortum subsidiary.

Uniper is Germany’s largest gas importer, operates a vast fossil generation business, is building up a renewable power base and is a key player in Germany's fledgling green hydrogen sector. It is also one of the country’s largest companies by revenue and considered key to maintain critical energy infrastructure in Europe’s largest economy.

“Whatever matters, we will do it, today and for as long as is needed,” German Chancellor Olaf Scholz said, adding his government will "make sure that no one is overwhelmed in the current situation." Berlin plans new subsidies for tenants with difficulties to pay for their future gas bills as the Uniper rescue also gives the company the possibility to pass on higher gas prices to consumers.

Uniper had come close to insolvency in the wake of Russian energy curtailment. As its gas trading activities are also crucial for the wider European energy sector, stabilising loss-making Uniper was seen as unavoidable by the government.

“We are living through an unprecedented energy crisis that requires robust measures. After intensive but constructive negotiations, we found a solution that in an acceptable way met the interest of all parties involved,” Fortum chief executive Markus Rauramo said.

“We were driven by urgency and the need to protect Europe’s security of supply in a time of war.

“For us it is also important that the solution now reached doesn’t require additional capital from Fortum beyond the already provided eight billion euros of financial support.”

The massive rescue package for Uniper followed tough negotiations with Fortum and the Finnish government, which refused to throw more taxpayer billions at the troubled German business after already having granted €8bn to the unit in a shareholder loan and company guarantees.

The German state as part of the stabilisation package will take a 30% stake in Uniper by subscribing about 157 million new ordinary shares at a value of €1.70 per share, which amounts to a cash consideration of €267m.

Fortum’s stake in Uniper in consequence will be diluted to 56%, from about 80% previously.

The German government has also committed to make another €7.7bn available in the form of mandatory convertible instruments to address potential losses "as and if needed".

German development bank KfW will also provide Uniper with an additional €7bn in liquidity support through an increase of its existing credit facility from the current €2bn to €9bn.

The German government also said it intends to introduce a cost absorption mechanism that covers 90% of the losses resulting from higher costs for gas replacement volumes caused by Russian gas curtailments from 1 October, and said it stands ready to provide further support if Uniper’s losses from the diminished gas flows exceed €7bn.

Uniper with the support of Fortum and the German government will work on a long-term solution to reform the wholesale gas contract architecture by the end of next year.

"We will not allow a systemically important company like Uniper to fall and thus jeopardise the security of supply in Germany," said economics and climate minister Robert Habeck.

“The energy shortage artificially created by Russia is not an ordinary fluctuation for the market to digest."

Fortum's Rauramo added: “New geopolitical realities have shaken the European energy system to the core, and this determines a new framework for European energy companies.

“Whilst we have now achieved immediate stabilisation of Uniper, further efforts will be required to create a long-term sustainable basis for the gas business."

The German government will have adequate representation on Uniper’s supervisory board, and also pushed through a condition for the rescue that Uniper will withdraw a law suit against the Netherlands over the country’s coal exit, as well as a stipulation that the company refrains from dividend payments and restricts manager remuneration.

UPDATED to add comment by German chancellor and economics minister