The ruling against Calpine ( CPN) in a dispute with creditors Tuesday could leave the debt-strapped power producer with a hole in its finances.

In a closely watched case, Chancery Judge Leo Strine ruled that Calpine violated the terms of a bond indenture when it spent $313 million last summer to buy natural gas to run its power plants. Bondholders argued that the money, raised from an asset sale, was collateral on their loans and couldn't be spent in this fashion to fund day-to-day operations.

News of the decision had investors running for the exits, with shares of Calpine falling 31 cents, or 17%, to $1.44 in frenzied trading. The stock was halted after the ruling came out.

The judge, in a 44-page ruling, said there were strict limits on how Calpine could use the money, which came from an $850 million asset sale in early July. Strine said buying natural gas was not one of the permitted uses and barred Calpine from making any further purchases.

"Calpine's proffered interpretation ... is erroneous," said Strine. "It may not proceed to make further purchases of this kind."

The bondholders had contended that the money raised from the asset sale should have been spent on something else, preferable a debt redemption. Calpine currently has about $17 billion of outstanding debt.

The judge left open the issue of how Calpine must rectify the situation, noting that not all the aggrieved creditors had joined the litigation. But he said a "restorative remedy is in order."

One thing Calpine won't be able to do is resell the natural gas it purchased. As the judge observed: "Calpine has burned up in its power plants all the $313 million worth of the natural gas."

A few hours after Strine's ruling, Calpine issued a statement that seemed at odds with the judge's decision. In a press release, the company said it is "still permitted to use its natural gas asset sale proceeds to purchase certain natural gas assets."

Of course, Calpine's lawyerly response all turns on what the meaning of the word "assets" is.

Either way, this is bad news for Calpine, which is no position to go out and raise additional financing to make its bondholders whole. It's not known what kind of remedy the creditors will seek to impose on the company.

Calpine had hoped the court would side with it, after the Bank of New York ( BK) informed the California-based energy company that it froze the remaining $400 million in its account. The bank took that step after some bondholders had protested about the way Calpine was spending the money.

Real Money contributor William Gabrielski argued in a column here that a ruling like Strine's Tuesday decision would raise uncertainty about Calpine's ability to fund its operations.

More from Markets

Dow Rises Sharply as U.S.-China Trade Tensions Thaw

Dow Rises Sharply as U.S.-China Trade Tensions Thaw

Apple Shares Gain as U.S. and China Call Off Trade War, For Now

Apple Shares Gain as U.S. and China Call Off Trade War, For Now

GE Confirms $11.1 Billion Transportation Merger With Wabtec

GE Confirms $11.1 Billion Transportation Merger With Wabtec

Treasury Secretary Mnuchin: 'Take the Over' on U.S. GDP Topping 3% This Year

Treasury Secretary Mnuchin: 'Take the Over' on U.S. GDP Topping 3% This Year

Video: Why the Stock Market Is Discounting China Trade Fears for Now

Video: Why the Stock Market Is Discounting China Trade Fears for Now