(Bloomberg) -- Economy Minister Robert Habeck indicated Siemens Energy AG has reached an accord with the German government and other stakeholders, bringing to a close weeks of discussions over shoring up the company’s finances. 

“A solution has to be found and I would say that we have found a solution and will make it public soon,” Habeck said Tuesday at a press conference in Berlin. 

The company plans to announce the deal Wednesday when it reports quarterly earnings, people familiar with the matter said, adding that under the agreement Siemens Energy would receive €12 billion ($12.9 billion) in loan guarantees from banks, as well as cash from former parent jand largest shareholder Siemens AG through the sale of part of its holding in an Indian joint venture. 

As part of the deal, the German government will provide €7.5 billion in so-called counter-guarantees to the banks involved, said the people, who declined to be named because the agreement isn’t public and the terms could still change.

Read more: Siemens Energy Mulls Selling Part of Indian Stake

The manufacturer had reached out to the government after struggles to contain massive losses at its wind-turbine unit. The issues are threatening Siemens Energy’s ability to win new contracts in its other profitable units. The financial hit from the problems is estimated to exceed €4 billion.

Siemens Energy shares were up 1.3% at 12:45 p.m. in Frankfurt and are down more than 40% this year.

Siemens will be indirectly involved in the guarantees by purchasing an 18% stake in a joint venture in India for more than €2 billion, Handelsblatt reported Monday. A further 5% stake in Siemens Ltd. India would serve as collateral, according to Handelsblatt, which cited unnamed sources.

Spokespeople for Siemens Energy and Siemens declined to comment.

©2023 Bloomberg L.P.