Barclays Plc urged a judge to throw out a lawsuit by Lehman Brothers Holdings Inc's bankruptcy estate alleging that it reaped a secret $5 billion profit from its rushed September 2008 purchase of the company's U.S. brokerage.

In a 325-page filing on Friday with the U.S. bankruptcy court in Manhattan, the British bank also rejected efforts by the Lehman estate to renegotiate the purchase on the grounds that the terms were supposedly too good for Barclays.

If Barclays lost money on this transaction, it would have been the end of the U.S. capital markets, said Barry Ridings, a Lehman financial adviser and senior restructuring adviser at Lazard Ltd , in a deposition quoted in Friday's filing.

If Barclays had expended this money and the capital markets continued to fall, there was a chance Barclays would then subsequently fail, which would have meant that Goldman (Sachs) , Morgan Stanley , the list goes on and on of firms that may fail, he went on. It was that bad.

Bryan Marsal, a restructuring expert who is also Lehman's chief executive, was not immediately available for comment.

Barclays cemented its roughly $1.54 billion purchase of Lehman's U.S. brokerage and some real estate just days after Lehman on September 15, 2008, filed what remains by far the largest bankruptcy in U.S. history.

Bob Diamond, Barclays' president, last month said the assets the bank acquired are performing better than expected.

Lehman's collapse came just hours after efforts to sell the entire company fell through, and triggered a financial crisis from which economies worldwide are struggling to recover.

The current debate on whether Barclays extracted a sweetheart deal turns in part on its September 18, 2008 agreement to advance $45 billion of cash to Lehman in exchange for $49.7 billion of collateral.

Lehman's estate contended that Barclays got a windfall when it later marked up some assets, and is now seeking billions of dollars in damages.

But Barclays maintained that the supposed $5 billion windfall is a fiction, that it is in fact Lehman and its trustee that owe it billions.

The British bank said it negotiated in good faith under distressed circumstances, and at the insistence of the Federal Reserve Bank of New York.

Repeating that Lehman's fast-deteriorating value was akin to a melting ice cube, it said that Lehman's own financial advisers did not see problems with the takeover terms, and recognized the consequences if no transaction got done at all.

Barclays added that accepting the Lehman estate's claims would be so grossly unreasonable that it would violate the due process and takings clauses of the U.S. Constitution.

A hearing on Barclays request is set for March 25. Objections are due by March 4.

The case is In re: Lehman Brothers Holdings Inc, U.S. Bankruptcy Court, Southern District of New York, No. 08-13555.

(Reporting by Emily Chasan in Las Vegas and Jonathan Stempel in New York; Editing by Steve Orlofsky)