The German government is reportedly close to fully nationalizing gas producer Uniper to save it from collapsing, Bloomberg reports.

Uniper UN01, +1.99%, its main shareholder Finnish state-owned energy company Fortum Oyj FORTUM, +9.50%, and the government have provisionally agreed on the rescue, with talks now in the final stages, Fortum has confirmed.

In a statement to the stock exchange on Tuesday, Fortum said that while no final agreement has been made, parts of the deal are still under negotiation.

These include the sale of “Fortum’s Uniper shares to the German State, return of the financing Fortum granted to Uniper as well as a planned capital injection by the German State to Uniper,” a Fortum spokesperson said.

An official announcement about the takeover is expected later this week.

Uniper shares have slumped 90% this year, but edged up 0.5% on Tuesday.

Last week, reports emerged that the deal could be carried out through the government buying out Fortum’s share to a stake of more than 50% and spending $8 billion and fully nationalizing the struggling gas importer.

Fortum currently holds a 78% stake in Uniper.

MarketWatch has reached out to the German economy ministry for comment.