BERLIN — Gazprom Germania, the German branch of Russian energy giant Gazprom, which was put under state control following Russia’s invasion of Ukraine, will be saved financially to avoid problems with the energy supply, the government in Berlin announced Tuesday.

“In order to ensure security of supply in Germany, the German government will secure the fiduciary management of Gazprom Germania in the longer term and protect the company, which has struggled as a result of sanctions imposed by Russia, from insolvency by means of a loan,” an official statement read.

“By taking this approach, the federal government retains influence over this part of the critical energy infrastructure and prevents energy security from being compromised,” the statement continued, adding that the chancellery, the economy ministry and the finance ministry agreed to extend state control of the company beyond September of this year.

In April, Economy and Climate Minister Robert Habeck announced that Germany’s Federal Network Agency would serve as a trustee for Gazprom Germania, arguing that the step was “imperative” due to what he called “critical infrastructure” run by the company. At the time, Habeck said it was a “transitory solution,” set to remain in effect until September 30.

But Tuesday’s announcement removed that deadline, saying that “unlike in the past, a new legal basis also allows for the trusteeship to be renewed several times.”