Germany is to nationalise gas giant Uniper in an effort to secure energy supplies amid the war in Ukraine.
The deal will see the German government take on a 98.5% stake in the firm at a cost of €8.5bn (£7.4bn).
Germany is Europe's biggest importer of Russian gas, and has been particularly squeezed as Russia has reduced supplies in recent months.
Chief executive Klaus-Dieter Maubach said the deal would help Uniper's role as "a system-critical energy supplier".
Before Russia invaded Ukraine it supplied Europe with about 40% of its natural gas, and it has responded to Western sanctions by gradually cutting off supplies.
At the start of this month, Russia halted supplies through the Nord Stream 1 pipeline, claiming repairs were needed - but later said flow would not resume until sanctions were lifted.
Uniper, which operates gas, coal, and hydro plants across Europe and is currently controlled by Finnish state-owned energy company Fortum, is the biggest buyer of Russian gas in Germany.
In recent months it has had to replace Russian supplies with alternatives from the open market, where prices have soared.
Fortum said Uniper had accumulated close to €8.5bn (£7.4bn) in gas-related losses "and cannot continue to fulfil its role as a critical provider of security of supply as a privately-owned company".
"The role of gas in Europe has fundamentally changed since Russia attacked Ukraine, and so has the outlook for a gas-heavy portfolio," Fortum chief executive Markus Rauramo said in a statement.
"As a result, the business case for an integrated group is no longer viable."
The price of shares in Uniper, which also owns the coal-fired Ratcliffe-on-Soar power station in Nottinghamshire, has fallen by more than 90% in the past year.
Under the terms of the deal, the German government will buy Fortum's shares in Uniper for €500m (£437m) and inject €8bn (£7bn) of cash into the business.
Some assets in Russia will also come under Germany's control, a government spokesperson said, adding that it was still being decided what would be done with them.
The government had already agreed to take on a 30% stake of Uniper as part of a bailout agreement in July.
Earlier this month, it also entered discussions with another major gas supplier, VNG, over a possible bailout package.
Economy minister Robert Habeck said nationalising Uniper was a "necessary" step that would help "ensure security of supply for Germany".
He also said that, despite the loss of Russian supplies, Germany had succeeded in filling its gas storage facilities to over 90% capacity ahead of winter.
"This means that, as a whole, we have coped quite well with the situation," he said. "But for Uniper the situation became significantly more dramatic and significantly worse."
A gas surcharge of 2.4 euro cents per kilowatt hour is also set to come into effect on October 1 and remain in place until April 2024.
Mr Habeck said the levy on consumers would make sure the country's energy providers remained viable.
"The state will… do everything necessary to keep companies stable on the market at all times," he said.
At the start of September, Germany introduced a series of measures intended to cut energy use and stave off shortages over the coming months.
Businesses are no longer allowed to keep their doors open throughout the day to reduce the need for heating, and illuminated advertising must be switched off after 10pm.
The halls and corridors of most public buildings will no longer be heated, and offices can only be heated to a maximum of 19C.
In July, energy ministers across Europe also agreed to reduce their natural gas consumption by 15%.