(Adds background on Berkshire, Energy Future bankruptcy)
July 6 (Reuters) - The energy unit of Warren Buffett's Berkshire Hathaway Inc is nearing a deal to acquire Oncor Electric Delivery Company LLC, allowing the utility to exit a three-year bankruptcy, according to people familiar with the matter.
The deal is a bold bet by Buffett that he can get the deal past Texas regulators after they blocked two earlier attempts to sell Oncor to other companies. It also represents a return to a previously soured investment for Buffet, who in 2013 lost $873 million on his bonds in Oncor's parent, Energy Future Holdings.
Berkshire Hathaway's deal, which could be announced by Friday, would value Oncor at slightly less than Florida utility NextEra Energy Inc's previous $18.4 billion bid, making it Buffett's third biggest acquisition ever, two people said.
The Wall Street Journal, which reported on the deal earlier, said the deal could be valued at more than $17.5 billion.
The sources asked not to be identified because the deliberations are confidential.
Terry Hadley, a spokesman for the Public Utility Commission of Texas, declined to comment. Oncor did not immediately respond to requests for comment. Berkshire and Energy Future declined to comment.
Any deal for Oncor would have to receive approvals from the judge overseeing Energy Future's bankruptcy, as well as federal and state regulators.
Earlier this year, the Public Utility Commission of Texas rejected NextEra's deal for Oncor, the largest network of power lines in the state, deeming that it was not in the public interest because it did not substantially ringfence Oncor's finances. Another deal for Oncor led by privately held Hunt Consolidated Inc of Texas fell through in 2016 after regulators also put up roadblocks.
Berkshire Hathaway had been among the leading bidders for Oncor in earlier auctions for the utility, according to the sources.
Energy Future filed for Chapter 11 in April 2014 after it failed to meet its debt obligations as electricity prices weakened. This followed a $31.8 billion acquisition in 2007 by KKR & Co, TPG Capital Management LP and Goldman Sachs Group Inc's private equity arm, the biggest leveraged buyout of all time that became the biggest bankruptcy ever. (Reporting by David French and Greg Roumeliotis in New York; additional reporting by Jonathan Stempel and Jessica DiNapoli in New York and Aparajita Saxena in Bengaluru; Editing by Lisa Shumaker and Jonathan Oatis)