In 2007, a consortium of international private-equity firms engineered the largest leveraged buyout in history. Goldman Sachs, KKR & Co., TPG Capital, Lehman Brothers, and others paid more than eight billion dollars in cash, and incurred another thirty-six billion dollars in debt, to purchase TXU Corp., an electric-utility company that provided power to a quarter of Texas residents. They renamed the company Energy Future Holdings. Much like the home buyers who believed, in 2007, that house prices would continue to rise indefinitely, the private-equity firms assumed that the price of electricity, Energy Future’s main product, would keep increasing. But, a year later, the price of natural gas began to fall. The financial crisis had sapped demand, but, more important, thousands of new wells were being tapped using a new method of hydraulic fracturing, or fracking, a mining technology that uses liquid injected at high pressure to break apart rocks and extract gas and oil. The new approach created a glut in the natural-gas market, driving down energy prices.

By the middle of 2009, gas prices had dropped to a quarter of the peak level they had reached a year earlier. Energy Future’s profits plummeted and haven’t recovered, leaving the company unable to repay its billions of dollars in debt. Berkshire Hathaway, which had bought some of the debt, sold its investment in the company last year, at a loss of eight hundred and seventy-three million dollars. At the time, Warren Buffett, Berkshire’s C.E.O., wrote to the company’s shareholders, “Most of you have never heard of Energy Future Holdings. Consider yourselves lucky; I certainly wish I hadn’t.” On Wednesday, with loan-repayment deadlines looming, Energy Future filed for Chapter 11 protection in Wilmington, Delaware, hoping to erase about forty billion dollars in debt.

Energy Future remains one of the largest power companies in the United States; the company owns power plants, lines that distribute electricity in Texas, and a commercial energy retailer that sells power directly to consumers. It will continue to power Texas homes during its restructuring. Since 2012, the company’s lawyers have been negotiating a settlement with most of its creditors, and they downplayed the impact of the bankruptcy itself, telling the U.S. Bankruptcy Court in Wilmington on Thursday morning that its businesses are expected to emerge from the restructuring in about a year.

Still, the collapse has been remarkable to watch, not least because it represents such a big downfall for the private-equity firms involved in the 2007 buyout. The deal came five years after Texas deregulated its power market, for the first time opening the retail electricity business to private competition. Before deregulation, TXU had been the largest provider of electricity in the state, with a monopoly in North Texas. After deregulation, TXU faced competition, but the company still owned the infrastructure for delivering energy to consumers. (An entity called the Electric Reliability Council of Texas, or ERCOT, manages the deregulated market.) No matter who Texans paid for their electricity, TXU earned a cut by sending the current through its power lines.

As a steady source of cash, newly deregulated utilities were an attractive target for Wall Street buyers. TXU and its suitors spent seventeen million dollars lobbying local lawmakers and regulators to smooth the deal, according to filings with the Texas Ethics Commission. When Texas state legislators arrived at the capitol on opening day in 2007, they were greeted with a welcome-back gift of twenty-four hundred breakfast tacos, compliments of TXU. Two months later, the deal closed. At the time, natural gas cost about six dollars per million British Thermal Units (B.T.U.s), a standard energy measurement. Within a year, the price had increased to more than thirteen dollars per B.T.U., and the deal was looking like a smart play for the private-equity companies.

Then the energy revolution happened. Fracking had been used for decades, but in the late nineties, after years of experimenting with variants of the process, a Texas wildcatter named George Mitchell discovered that a combination of sand and water (known as “high-volume slick water hydrofracturing”) was cheaper and more effective than previous methods, which relied on other, heavier fluids. At the time of the Energy Future buyout, this process was just beginning to be exploited. Devon Energy, an Oklahoma oil-and-gas producer that had bought Mitchell’s company in 2002, had found that it could extract even more gas from each well by pairing his method with horizontal drilling. Other companies began copying the combined technique, setting off a natural-gas boom in 2008. By early 2012, the price of natural gas had fallen to less than two dollars per B.T.U.

“It’s not a surprise that our fracking technology has helped turn American gas markets upside down,” Mitchell told the Economist that year. “We were confident in its upside potential. What’s surprising is how quickly it’s happening.” U.S. oil production, after declining for about twenty-five years, rose forty-seven per cent between 2008 and 2013, according to Bloomberg. Shale-gas extraction, which represented one per cent of U.S. natural-gas supplies in 2000, made up thirty per cent of the total last year.

The boom has also reshaped the landscape in the regions where shale is found. While Energy Future’s investors have lost billions of dollars, startup fracking operations—and the engineers, landowners, truckers, and oil-field workers who sustain them—are growing rich. The Eagle Ford Shale region, in the scrub country of South Texas, has become a patchwork of thousands of drilling pad sites, the night sky illuminated by the blue and yellow flames of gas flares. The Permian Basin shale region, encompassing Odessa and Midland in West Texas, is experiencing some of the highest G.D.P. growth in the country, according to the U.S. Department of Commerce. “You can’t get a hotel in Odessa for less than three hundred dollars,” ERCOT’s general counsel, Bill Magness, said. “And we’re not talking Four Seasons.”

Photograph: Allison V. Smith/Redux