Barclays Capital Inc has asked a court to let it keep billions of dollars in Lehman Brothers Holdings Inc assets, even though the trustee of the bankrupt investment bank says the remaining Lehman customers should probably get them.

James Giddens, the trustee in charge of liquidating Lehman's brokerage and making sure customers receive their assets, as of January had identified about $6.7 billion of cash and securities that he said was wrongfully transferred to Barclays.

But Barclay's, which bought Lehman Brothers Holding after the investment firm's collapse, contends that the trustee is seeking to change the terms of the original sale order. Barclays is also asking the court to order delivery of all undelivered assets.

Barclays would not have done the deal if it had not been promised billions in assets in various accounts, the company said in court documents dated Monday.

The Trustee cannot now (after market conditions have radically improved) disavow the terms of the deal that made survival possible, said Barclays.

Lehman filed for Chapter 11 protection from creditors on September 15, 2008, the largest U.S. bankruptcy filing in history. Its flagship U.S. brokerage business was sold to Barclays less than a week later for about $1.85 billion.

Lehman has asked U.S. Bankruptcy Judge James Peck to make changes to the September 2008 sale order that authorized the hastily arranged deal and to force Barclays to return assets to its bankruptcy estate.

At the center of the dispute are questions about which Lehman's and Barclays advisers knew about the deal at what time and whether anyone was purposely kept in the dark.

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

(Reporting by Chelsea Emery and Emily Chasan; Editing by Lisa Von Ahn)