When Citigroup made a $2 billion deal to buy its way out of an Enron shareholder suit last week, the world sat up and took notice. But few people noticed an event the previous day that symbolized the full recovery of one of Enron's biggest corporate victims: PG&E Corp. PG&E owns Pacific Gas & Electric, the huge California utility that was driven into bankruptcy by the California "energy crisis" that Enron and its ilk made far worse than it should have been.

Last Thursday, the day before Citigroup agreed to pay Enron shareholders a few cents on each lost dollar, PG&E shareholders got the best revenge: money. Their stock closed at an all-time high of $36.55, erasing the previous high set on Sept. 1, 1993. That's more than five times the $6.55 that PG&E stock fetched on April 6, 2001, the day the company put Pacific Gas & Electric into bankruptcy.

We now know that the California crisis, which drove the state's regulated utilities to the wall, was made worse by companies like Enron that were gaming California's energy markets, running up prices and making a fortune. Pacific Gas & Electric, for one, got stuck paying $9 billion more for power than regulators allowed it to collect from its customers.

When Pacific Gas & Electric went into bankruptcy, skeptics -- including me -- scoffed at claims by PG&E that its utility was solvent, and would pay all its debts in full. Ultimately, however, it did just that when the "crisis" abated, regulators let it raise rates and it started to collect some of its deferred costs.

In a case of yo-yoing ironies, PG&E may even owe a debt of sorts to the Enrons of the world. Or as they teach you in business school, being lucky can be as important as being good. PG&E did a masterful job of putting Pacific Gas & Electric into bankruptcy and shaking up its regulators, but it plain lucked out when it came to a second bankrupt subsidiary: National Energy.

National Energy was an unregulated "merchant power" company that owned electric generating plants and gas pipelines. When Pacific Gas & Electric was choking, National Energy, like other merchant companies, was scarfing down big profits. This was back in the day when Enron and other merchants that traded power and owned unregulated generating plants were Wall Street darlings.

National Energy's creditors and trading partners worried that it would be tainted by PG&E and Pacific Gas & Electric. So PG&E set up a "ring fence" to isolate National Energy from its corporate parent and sibling. As part of that process, PG&E stopped guaranteeing National Energy's obligations. That seemed just fine in early 2001, because National Energy was strong while PG&E and Pacific Gas & Electric were weak.

But when details of sleazy power-trading activity began to emerge in 2003, Standard & Poor's cut credit ratings on merchant power companies -- an example of bad behavior being bad for business. Credit evaporated, trading dried up, merchant companies began failing. National Energy went into Chapter 11 in July 2003.

But guess what? The ring fence that was originally designed to isolate National Energy from PG&E's problems ended up isolating PG&E from National Energy's problems. Even though PG&E took a total loss on its $3 billion National Energy investment, it escaped from the bankruptcy by paying a mere $30 million to creditors rather than the billions it would have owed had the ring fence never been erected. National Energy emerged from bankruptcy in October 2004 under new ownership, but it was no longer PG&E's problem.

Meanwhile, Pacific Gas & Electric had emerged from bankruptcy -- intact -- in April 2004. So despite having had both its major subsidiaries in bankruptcy at the same time, PG&E managed to emerge in good shape. The Wall Street wheel has turned, regulated utilities are popular again, PG&E has prospered.

One final point. This saga doesn't mean that you should run out and buy stocks of companies in Chapter 11. That's almost always a sucker's bet. PG&E didn't go into bankruptcy -- its subsidiaries did. PG&E made out because it was both shrewd and lucky. If you play this game without being really careful, you'll discover -- as people who bought Enron during its Chapter 11 proceedings did -- that stocks can in fact go to zero. Yesterday, PG&E broke through its highs of last week, closing at $37.05. Meanwhile, Enron shareholders can only hope that they'll get more from Friday's settlement than it will cost to mail in the claim form.

Setting the Record Straight: Last week I said that SEC chairman-designate Rep. Christopher Cox (R-Calif.) is from Silicon Valley. I meant to say that he's tight with Silicon Valley, which is hundreds of miles north of his congressional district, which is in Southern California.

Sloan is Newsweek's Wall Street editor. His e-mail address is sloan@panix.com.