Barclays' takeover of much of Lehman Brothers' US operations in 2008 was flawed but fair, a judge in New York has ruled.
Lehman had sued Barclays for $11bn (£6.8bn) in damages, claiming the bank was given special treatment.
However, while the judge said the sale process was "imperfect", it was still "adequate" under the circumstances.
Barclays bought Lehman's US operations in a hastily-arranged sale at the peak of the credit crisis in September 2008.
Lehman agreed to sell its US investment banking and broking arm for $1.85bn five days after it filed for Chapter 11 bankruptcy protection.
That, and the fact Lehman was the highest profile bank to be allowed to fail, was one of the most significant events of the global crisis.
Lehman's bankruptcy estate had hoped to extract an $11bn "windfall" payment from Barclays.
However, US Bankruptcy Judge James Peck said in his opinion statement that while the deal had not been without flaws, it was sound overall.
"The sale process may have been imperfect, but it was still adequate under the exceptional circumstances of Lehman Week," he said.
The deal was seen by many as vital for keeping the international banking system alive.
Judge Peck there was an "undeniably correct" perception at the time that the sale "mitigated systemic risk," and helped avert "an even greater economic calamity".
He said there was no better alternative to the sale, which avoided "a potentially disastrous piecemeal liquidation" and saved thousands of jobs in the financial services industry.
A spokesman for Barclays said the UK bank was pleased that the court had found that Barclays had acted in good faith.
Lehman, which has sued other banks including Bank of America and JP Morgan Chase to recover assets for creditors, gave no immediate comment.
Earlier this month, Barclays reported pre-tax profits of £6.07bn for 2010, up almost a third on the £4.59bn profit the bank made in 2009.