Energy Transfer Equity (ETE) is set to walk from its agreement to buy rival natural gas pipeline company Williams Cos. (WMB - Get Report) after Del. Vice Chancellor Sam Glasscock ruled late this afternoon that ETE's lawyers at Latham & Watkins acted in good faith when they decided they could not issue a tax opinion required to close the deal.

Williams has not yet said if it will appeal the decision to the Delaware Supreme Court, which would have to act quickly to overturn the lower court judge's ruling. Williams shareholders are set to vote on the deal on Monday, and closing must occur by Tuesday or ETE will be able to walk. Williams did say in a release that it "does not believe ETE has a right to terminate the merger agreement." The target added that it "remains committed to closing the merger" and would "take appropriate actions to enforce its rights under the agreement" if ETE terminated the deal. Williams also advised its shareholders to vote for the deal.

 The Williams release notwithstanding, Glasscock's ruling is heavily fact-dependent and cites only three Delaware decisions in 138 footnotes, which may make the Supreme Court reluctant to step in, since the high court general defers to the findings of fact made by lower court judges.

"It is clear to me," the judge wrote at the start of his 58-page opinion, that the deal "is now manifestly unattractive" to ETE. As a result, he said, "I approached this matter with a skeptical eye." But, he cautioned, "just as motive alone cannot establish criminal guilt, motive to avoid a deal does not demonstrate lack of a contractual right to do so."

The decision came after a two-day trial on Monday and Tuesday and capped months of sparring between the two companies, which agreed in September to a deal that was then worth $38 billion in cash and stock. But as oil and gas prices continued to fall, the $6.05 billion in cash that ETE had agreed to pay made the deal increasingly unattractive to the prospective buyer, since borrowing that money would have put the combined company under considerable financial pressure.

ETE's Kelcy Warren wanted to nix the deal as early as December, former ETE CFO Jamie Welch said in his deposition in the case, and company executives and outside advisers worked to come up with a way out. In April, ETE said that its tax lawyers at Latham & Watkins would be unable to opine that one aspect of the deal's complicated structure merited tax-free treatment. Since the provision of that opinion was a condition to closing, ETE claimed it was under no obligation to consummate its purchase of Williams.

The target argued that ETE was not using commercially reasonable efforts to close the deal but was in fact pressuring Latham not to issue the ruling. But ETE's head of tax Brad Whitehurst testified that he discovered the tax issue only in late March, and Laurence Stern and Tim Fenn, his tax lawyers at Latham, corroborated that claim to Glasscock's satisfaction.

In the Delaware case, Williams used Sandra Goldstein, Antony Ryan and Kevin Orsini of Cravath, Swaine & Moore in New York and Kenneth Nachbar of Morris, Nichols, Arsht & Tunnell in Wilmington. Energy Transfer retained Michael Holmes, John Wander and Michael Charlson of Vinson & Elkins in Houston and Rolin Bissell of Young Conaway Stargatt & Taylor in Wilmington.

For the merger, Williams took financial advice from Barclays' Gary Posternak and Barbara Byrne and Lazard's Albert Garner and Doug Fordyce. For legal advice Williams tapped a Cravath team led by Minh Van Ngo and Richard Hall with Andrew Needham and Christopher Fargo on tax and a Gibson, Dunn & Crutcher team led by Steven Talley, Eduardo Gallardo and Robyn Zolman with Eric Sloan on tax.

Energy Transfer's outside legal advisers were led by Wachtell, Lipton, Rosen & Katz's David Katz, David Lam and Alison Preiss with T. Eiko Stange on tax. Latham & Watkins was special tax counsel. Laurence Stern and Tim Fenn led that effort. Bill Finnegan, Ryan Maierson and Mark Gerstein also worked on the deal. William McKee and William Nelson of Morgan, Lewis & Bockius also provided tax advice to ETE.