American casino giant Caesars Entertainment Corporation has begun the process of raising up to $3.8 billion that its Caesars Entertainment Operating Company Incorporated subordinate needs in order to finally exit a contentious two-year bankruptcy.

According to a report from the Reuters news service, Caesars Entertainment Corporation made the announcement via a filing with the United States Bankruptcy Court in Chicago on Wednesday after last month securing support from the vast majority of its creditors for a wide-ranging plan to get its operating arm out of bankruptcy by early next year.

The arrangement follows more than a year of legal wrangling and is set to see Caesars Entertainment Corporation, which is responsible for such properties as the Rio All Suite Las Vegas Hotel And Casino, Bally’s Atlantic City Hotel And Casino and Caesars Windsor Hotel And Casino, split the bankrupt unit into a casino operator and real estate investment trust with both controlled by creditors.

If the plan wins the approval of the United States Bankruptcy Court at a trial set for January, Caesars Entertainment Operating Company Incorporated will be required to secure at least $1.8 billion in new financing for the new real estate investment trust alongside $1.2 billion for the casino operating arm before the reorganization plan can become effective.

“If confirmed by the court, the plan requires that [Caesars Entertainment Operating Company Incorporated] raise approximately $3 billion to $3.8 billion of cash from third-party exit financing,” read the filing from Las Vegas-based Caesars Entertainment Corporation.

Caesars Entertainment Operating Company Incorporated filed for Chapter 11 bankruptcy protections in January of 2015 with debts of $18 billion while creditors subsequently alleged that the parent had looted the unit prior to declaring insolvency.

In exchange for creditors agreeing to drop claims worth billions of dollars, Caesars Entertainment Corporation has also promised to contribute some $5 billion to the reorganization plan. To do this, it is planning to give investors stock in a new group it will create by merging with its Caesars Acquisition Company affiliate, which in July agreed to sell its Caesars Interactive Entertainment online games unit for $4.4 billion in cash.