NEW YORK (AP) — JPMorgan Chase has agreed to a deal that will return $546 million to former customers of trading firm MF Global Holdings, which collapsed in 2011 with $1.6 billion missing from its accounts.

JPMorgan Chase & Co. held MF Global funds in several accounts and also processed the firm’s securities trades. The New York bank will now pay $100 million to reimburse customers and will relinquish claims on $417 million that it previously returned, according to a settlement agreement filed in Manhattan bankruptcy court on Tuesday. JPMorgan also will return over $29 million that it is holding as security on an MF Global credit line.

MF Global failed in October after a calamitous bet on European debt spooked its investors, partners and clients. The bankruptcy was the eighth-largest in the U.S. and the largest on Wall Street since the 2008 collapse of Lehman Brothers.