A federal judge has ruled that four of the energy companies that built and then abandoned the Great Plains Gasification Project, the nation's largest synthetic-fuels plant, must honor their contracts to buy gas from the plant at more than three times the market price.

The decision was a major victory for the Energy Department, which took over the $2.1 billion plant last summer when the companies defaulted on their federally guaranteed loan. The government is now seeking to sell the plant to recoup some of its $1.5 billion debt to the U.S. Treasury.

U.S. District Court Judge Patrick Conmy's ruling essentially guarantees a profitable market for gas from Great Plains, which went into operation a year ago and is producing 135 million cubic feet of gas a day.

"We are pleased by the court's decision," Energy Secretary John S. Herrington said. "By declaring the gas purchase contracts valid and enforceable, the court has affirmed the very real market value of the plant."

The decision is the latest event in a turbulent decade for Great Plains, once envisioned as the flagship in a national effort to reduce dependence on foreign oil. The plant is in Beulah, N.D.

Sinking energy prices in the early part of this decade made the plant increasingly uneconomical, and the five companies that built the facility walked away last August after Herrington vetoed an additional $720 million in price supports.

Under 30-year contracts signed before the plant was built, however, four of those firms had agreed to buy its gas under a complex price formula that was pegged to the cost of fuel oil. Those four companies were Tenneco Inc. of Houston; American Natural Resources Co. of Detroit; Transco Energy Co. of Houston, and MidCon Corp. of Lombard, Ill.

The contract price is now $6.27 per thousand cubic feet, more than three times the spot-market price of less than $2 per thousand cubic feet.

After DOE took over the plant, the companies contested those contracts, arguing that they had not expected natural gas prices to fall.

Conmy rejected the argument, ruling that "the change in economic reality, as opposed to economic projections, may have a bearing upon the wisdom of the contracting parties, but does not render the contract unenforceable."

The fifth original partner in Great Plains, the Pacific Lighting Co., did not sign a contract to purchase gas.

Conmy also cleared the way for DOE to take immediate possession of the plant, declaring that a North Dakota law forbidding foreclosure action for one year did not apply to Great Plains. Upon foreclosure, the five partners will owe the U.S. Treasury an additional $300 million for the repayment of tax credits taken during the plant's construction.

A spokesman for American Natural Resources, which operates the plant under contract to DOE, said that the four companies had not decided whether to appeal the ruling.

DOE officials said they had received "some expressions of interest" in purchasing the plant, which one official described as "an excellent success technically, if not economically."