The high court in London yesterday ruled that JP Morgan Chase had not engaged in any conspiracy with Enron, handing the American banking group a rare victory in the morass of lawsuits surrounding the collapse of the energy firm.

The J. P. Morgan Chase & Company said yesterday that a London court ordered the German bank WestLB to pay $165 million along with interest and costs in a suit related to the collapse of the energy trader Enron.

WestLB did not honor a $165 million letter of credit purchased to guarantee a prepaid gas contract between J. P. Morgan and Enron against default, J. P. Morgan said. The deal was done through a special-purpose company, Mahonia.

In late 2001, after Enron collapsed into bankruptcy protection, Mahonia sued WestLB to collect on the $165 million letter of credit. But WestLB said it would not pay, calling the deal a “fraudulent scheme” involving Enron.

The ruling was made by Justice Jeremy Cooke of the High Court of Justice in London, where Mahonia is based.

WestLB led a syndicate of 14 banks that included four other German banks, as well as Lloyds TSB and Anglo Irish Bank.

Mahonia and other special-purpose companies had allowed Enron to receive money up front through a series of prepaid contracts signed from the mid-1990’s until Enron collapsed in December 2001. The deals had drawn United States regulatory scrutiny because they appeared to be disguised loans.

But the judge in the London trial said they were legitimate contracts that were properly accounted for by J. P. Morgan Chase and Enron in accordance with generally accepted accounting principles.