(Adds background on Oncor and Berkshire)
By David French and Greg Roumeliotis
July 6 (Reuters) - The energy unit of Warren Buffett's Berkshire Hathaway Inc is nearing a roughly $18 billion deal to acquire Oncor Electric Delivery Company LLC, people familiar with the matter said, three years after the utility's parent entered bankruptcy.
The deal is a bold bet by Buffett that he can win approval for the acquisition from Texas regulators, after they blocked two earlier attempts to sell Oncor, one of the largest U.S. power-transmission networks, to other companies.
It also represents a return to a previously soured investment for Buffett, who in 2013 lost $873 million on a $2 billion bond investment in Oncor's bankrupt parent, Energy Future Holdings Corp.
Berkshire Hathaway's deal, which could be announced by Friday, would value Oncor at slightly less than a previous $18.4 billion bid by Florida utility NextEra Energy Inc - which Texas regulators rejected - making it Buffett's third biggest acquisition ever, two people said.
The Wall Street Journal, which reported on the acquisition 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.
A spokesman for the Public Utility Commission of Texas, which would have to approve the deal, declined to comment. Oncor did not immediately respond to requests for comment. Berkshire declined to comment.
Any deal for Oncor, considered the most valuable among Energy Future's assets, would also have to be approved by the judge overseeing the bankruptcy.
Energy Future has been stuck in bankruptcy since it filed for Chapter 11 protection in 2014 as plans to sell Oncor, repay creditors and fund its exit have collapsed under regulatory scrutiny.
KKR & Co LP, TPG Capital LP and Goldman Sachs Group Inc's private equity arm took Energy Future private in 2007, in the biggest ever leveraged buyout with a total deal size of $44 billion.
In the deal, the private equity firms also acquired Energy Future's retail and power generation businesses, the largest in Texas, which also then later filed for bankruptcy.
Earlier this year, the Public Utility Commission of Texas rejected NextEra's deal for Oncor, deeming it not to be in the public interest.
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. It is unclear what concessions Berkshire is prepared to make to meet the requirements of Texas regulators.
Investors have prized regulated utilities such as Oncor for their steady cash flow. Adjusted operating cash flows rose 12.6 percent year-on-year in 2016, according to securities filings.
Berkshire's energy division, Berkshire Hathaway Energy, owns several other utilities, natural gas pipelines and electricity transmission businesses, including the PacifiCorp and NV Energy utilities in the western United States.
The energy unit contributed $2.29 billion in profit last year, while Berkshire overall made $24.07 billion.
A deal for Oncor would also help Buffett utilize some of Berkshire's unused pile of cash, which totaled $96.5 billion at the end of March.
The biggest creditor of Energy Future, activist investor Elliott Management Corp, filed a lawsuit against the company in May, asking it to pursue alternatives beyond the deal with NextEra.
According to the lawsuit, Elliott wanted to lay the groundwork for a standalone plan of reorganization for Energy Future, allowing the utility to exit bankruptcy as an independent company, or find another buyer. (Reporting by David French and Greg Roumeliotis in New York; Writing by Jessica DiNapoli; Additional reporting by Jonathan Stempel and Aparajita Saxena in Bengaluru; Editing by Jonathan Oatis and Leslie Adler)