Berkshire Hathaway Energy, a division of Warren Buffett's Berkshire Hathaway Inc.,  (BRK.A) - Get BRK.A Report (BRK.B) - Get Berkshire Hathaway Inc. Class B Report  , confirmed Friday that it will purchase Oncor Electric Delivery Co. LLC in a deal that values the bankrupt unit's equity at $11.25 billion.

Berkshire Hathaway Energy will pay $9 billion in cash to Oncor's parent, Energy Future Holdings Corp, a group that Buffett invested in, via a corporate bond, back in 2013, resulting in one of the Sage of Omaha's rare losses. The deal is expected to close by the end of the year, the companies said, pending approval from both regulators and bankruptcy courts.

"Oncor is an excellent fit for Berkshire Hathaway, and we are pleased to make another long-term investment in Texas - when we invest in Texas, we invest big!", Buffett said in a statement. "Oncor is a great company with similar values and outstanding assets."

If approved, the deal will close a rowdy battle for Oncor's assets, which at one point NextEra Energy Inc. was prepared to pay $18 billion for before being knocked back by the Public Utility Commission of Texas, which voted unanimously voted on April 13 to reject the deal as not being in the public interest. The transactions included NextEra's purchase of Energy Future Holding's Corp.'s 80% interest in Oncor for about $18.7 billion.

TheStreet Recommends

"By joining forces with Berkshire Hathaway Energy, we will gain access to additional operational and financial resources as we continue to position Oncor to support the evolving energy needs of our state," said Oncor CEO Bob Shapard. "Being part of Berkshire Hathaway Energy is a great outcome for Oncor. Oncor will remain a locally managed Texas company headquartered in Dallas, committed to the communities we serve, and our customers will continue to receive the safe and reliable service they have come to expect from our dedicated team of employees."

The Dallas electricity producer filed for Chapter 11 protection on April 29, 2014, to implement a restructuring that was later scrapped. At the time, EFH's total debt was just under $42 billion.

EFH, formerly known as TXU Corp., was formed after a consortium of private equity firms, including Kohlberg Kravis Roberts & Co. LP (KKR), TPG Capital LP and Goldman, Sachs & Co., acquired the company for about $32 billion in equity on Oct. 10, 2007, assuming $13 billion in debt.

More of What's Trending on TheStreet: