LONDON - Thames Water, Britain's biggest water supplier, has lined up a financing lifeline of up to 3 billion pounds ($3.89 billion) to ensure its survival over the next year and beyond, in a deal which must now be approved in court.

The government has been on standby to place Thames Water, which is at the centre of a scandal over sewage pollution in rivers, into a special administration regime given the risk of a financial collapse.

But Thames Water Chief Executive Chris Weston said on Friday that the new debt package would put the company on a more stable financial footing, making the worst case scenario more unlikely.

Thames Water has secured a first court hearing on Dec. 17 to approve the plan, which will see it take on an initial tranche of 1.5 billion pounds of loans that will rank ahead of existing debt, extending its liquidity to October 2025.

To date, creditors representing about 6.7 billion pounds of secured debt have agreed to support the deal, and a "substantial" number of creditors are in ongoing approval processes to support it, Thames Water said in its statement. The Financial Times reported on Friday that British water retailer Castle Water is looking to acquire a controlling stake in Thames Water, citing people familiar with the matter.

The FT said that the exact size of the stake has not been disclosed. Thames Water declined to comment. Castle Water did not immediately respond to a request for comment.

Holders of about 12 billion pounds of Thames Water debt have been in talks with the struggling company, which supplies about a quarter of the UK population with water, about providing the interim liquidity facility.

The lifeline package also includes a further tranche up to 1.5 billion pounds which would tide Thames Water over if it decides to launch a regulatory appeal over the prices it can charge consumers over the next five years, extending its liquidity until May 2026.

Should the lifeline be secured, it will give Thames Water time to restructure its about 16 billion pounds of debt, paving the way for it to raise new equity and ensure its survival in the long term.

There could be some dispute between creditors about the terms on which the loan is being made to Thames Water. Reuters reported on Thursday a group made of mainly so-called B note investors, had proposed an alternative liquidity package.

Thames warned in September it could run out of funds in just three months if the majority of its lenders did not approve further borrowing to keep it going.

($1 = 0.7715 pounds)

(Additional reporting by Yadarisa Shabong in Bengaluru; reporting by Sarah Young and Anousha Sakoui in London; Editing by Kate Holton in London, Savio D'Souza and Abinaya Vijayaraghavan and David Evans)