(Adds judge's comments and background)
By Tracy Rucinski and Jim Christie
Aug 26 (Reuters) - Energy Future Holdings Corp , Texas' biggest power company, won U.S. court approval on Friday for a plan that will allow the bulk of its operations to exit Chapter 11 after two years of battling creditors.
"I am going to overrule all of the remaining objections, U.S. Bankruptcy Judge Christopher Sontchi said in court in Wilmington, Delaware. "I am prepared to confirm."
Dallas-based Energy Future filed for bankruptcy in April 2014 when weak electricity prices left it unable to service $42 billion in debt, mostly related to the company's creation through a 2007 leveraged buyout.
It was the largest U.S. bankruptcy since that of General Motors Co in 2009.
The reorganized company will own TXU Energy, the state's largest retail electric utility, and Luminant, Texas' largest power plant operator and largest coal miner. The spinoff of the two divisions into the new company avoids a tax liability that had worried creditors.
The potential for a "massive" tax liability was the "elephant in the room," Sontchi said on Friday, adding he believed the plan "was the best possible deal" to push the company out of bankruptcy.
"A tax-free separation was a critical component to maximizing the value of the estate," Energy Future spokesman Allan Koenig said in an email.
Energy Future's 80 percent stake in power distribution business Oncor, which owns the largest network of power lines in Texas, remains in Chapter 11 and will face its own confirmation hearing in December.
A previous plan by Energy Future to exit bankruptcy won approval from Sontchi last year but fell apart when regulators opposed the sale of Oncor to a group of creditors and investors led by privately held Hunt Consolidated Inc of Texas.
Energy Future agreed in July to sell Oncor to Florida's NextEra Energy Inc in a deal valued at $18.4 billion but is still accepting other bids for the business.
Before it becomes effective the latest reorganization needs regulatory approval from the Railroad Commission of Texas, which the company said it expects in September.
The plan won broad support from creditors but was opposed by some noteholders who said it would not fairly compensate creditors for tax benefits and back-office operations that would be transferred to the new company.
The new owners, the company's first lien lenders, have yet to select a name for the reorganized company. (Reporting by Tracy Rucinski in Chicago and Jim Christie in San Francisco; Editing by Matthew Lewis)