TXU (TXU) rallied Monday as the company found a quick fix for its problems in Europe.

Shares in the big utility company jumped 17% on news that TXU was dealing its British operations to Germany's E.On for $2.13 billion in cash, plus $375 million in debt assumption. The sale comes as TXU investors endure a stormy October featuring cuts in the company's debt ratings and dividend payout and the reversal of a years-old European expansion plan.

The rally pushed TXU shares up $1.74 to $13.12. Still, the last month's events have hit shareholders hard: TXU stock brought more than $40 only a month ago.

October hasn't been kind to utility investors in general, but TXU holders have been particularly hard hit. Just a week ago the stock plunged 40% as the company

conceded that its European venture was a failure that was sapping the company's eroding financial strength. Earlier, ratings agencies cut TXU's debt ratings, forcing the company to slash its dividend just a week after reassuring investors that the payout was safe.

With the sale, E.On's Powergen unit gains 5.3 million U.K. power and gas customers and 2.9 gigawatts of power generation. The deal will help raise some much-needed cash at TXU, but it will come at the expense of the company's balance sheet: TXU said Monday it would take a $3 billion to $4.5 billion writeoff for the sale of the businesses.

Dallas-based TXU expanded into Europe in the 1990s, but the foray turned sour when U.K. wholesale electricity prices fell and remained depressed. TXU last Monday abandoned a plan to spend $700 million propping up its European subsidiary and instead put it up for sale at auction. The British unit attracted four bidders.