(Bloomberg) -- German energy giant Uniper SE was forced to borrow billions to pay down margin calls -- the collateral exchanges require to back up trades -- as European gas and electricity prices rallied.

Uniper got additional loans totaling 10 billion euros (11.3 billion) from its Finnish parent Fortum Oyj and KfW IPEX-Bank, the company said in a statement after the close of trading on Tuesday. This is the second time in less than six months that the company is forced to prop up liquidity as energy prices surge.

Europe is facing an energy crunch as Russia curbs gas supplies at a time demand is rebounding. Gas and power prices broke records last year, and while a flotilla of U.S. liquefied natural gas cargoes cooled the rally in the second half of December, prices are now on the rise again.

“Higher commodity prices lead to temporarily higher margining requirements,” Uniper said. “At the same time, higher commodity prices increase the value of Uniper’s underlying gas and power assets. Therefore, Uniper’s structural earnings prospects are not adversely impacted by higher prices.”

European gas prices had their most volatile year on record in 2021, with prices surging as much as 40% in just one day in October. The enormous gains meant some companies had to tap additional funds, while several small energy suppliers folded. RWE also had “additional liquidity requirements,” Chief Financial Officer Michael Muller said in November.

Commodities trader Gunvor Group Ltd. also faced about $1 billion in margin calls last year, according to people familiar with the matter. The largest independent LNG trader in December signed a $1.14 billion loan to trade the fuel shortly with lenders including Rabobank and Societe Generale SA.

Uniper got an 8 billion euro credit line from Fortum on Dec. 22, part of which has already been used. The company has also fully drawn the existing 1.8 billion-euro credit facility it has with its core banks. It further tapped 2 billion from KfW on Jan. 4 as “a back-up facility in case of further extreme commodity market developments.”

Energy firms were also faced with extreme volatility at the end of last year, when gas prices surged all the way through March 2023. The fuel for delivery in the summer -- when gas is usually cheap -- exceeded 100 euros a megawatt-hour at some point in December, the highest on record.

(Updates with loan details in seventh paragraph.)

©2022 Bloomberg L.P.