A federal judge approved a settlement Friday designed to keep Southern California Edison out of bankruptcy by forcing customers to continue paying higher rates imposed last May for at least two more years.

The deal also would require Edison shareholders to forgo $1.2 billion worth of dividends over three years.

U.S. District Judge Ronald S.W. Lew called the settlement "fair, adequate and reasonable to the parties, the shareholders and to the public and is not a bailout by any means."

The deal, which was secretly negotiated between lawyers for the utility and the state Public Utilities Commission, settles a lawsuit filed by Edison last fall.

It is intended to allow Edison to pay off an estimated $3.3 billion of its more than $6 billion debt, and keep it from following Pacific Gas and Electric, the state's largest utility, into bankruptcy.

Edison attorney Steve Pickett praised the judge's decision, calling it "a very critical first step necessary to create the cash flow to pay creditors."

Edison, the state's second-largest utility, said it believes it will accumulate enough cash and gain financing by February to pay its debt to banks, bondholders and power generators.

PG&E and Edison blame their financial woes on California's 1996 deregulation law that prevented them from passing on skyrocketing wholesale power costs to ratepayers. The state stepped in, buying billions of dollars in power for the credit-starved utilities.

Earlier this year, the commission approved a $5 billion electricity rate hike, the biggest in California history. Regulators then boosted rates by as much as 80 percent for residential customers who use the most power.

Gary Cohen, a lawyer for the PUC, said the deal should allow Edison to pay its debt by the end of 2003. The commission will retain authority over Edison in contrast to a reorganization proposed by PG&E to cope with its financial troubles.

"What we're doing is trying to get SoCal Edison financially healthy so it can resume purchasing power for its customers and we can get the state out of the power-buying business," Cohen said.

Consumer groups have complained that the commission violated state law by secretly working out the settlement without public hearings.

Reliant Energy Services and Mirant Corporation, which are owed more than $260 million by Edison for power purchases, also criticized the agreement for being "silent about the mechanics of payment to creditors." They want more time to study the proposal.

An attorney for the Utilities Reform Network, a San Francisco-based consumer advocacy group, promised an appeal of what he called an "incredible incursion of federal jurisdiction on state regulation."

PG&E expects to hold a conference in its bankruptcy case Tuesday that will allow the utility, U.S. Bankruptcy Judge Dennis Montali and creditors to schedule deadlines for PG&E's financial restructuring.