UBS Americas will pay $885 million to settle ongoing litigation with the Federal Housing Finance Agency over the bank's sale of toxic residential mortgage-backed securities to Fannie Mae and Freddie Mac.

The agreement ends one of many cases filed against banks by the FHFA. The conservator for Fannie and Freddie alleged that the various banks violated federal and state securities laws when selling private-label RMBS to the housing agencies. 

Under the terms of the settlement, UBS will pay approximately $415 to Fannie Mae and $470 to Freddie Mac to resolve certain claims related to securities sold to the entities between 2004 and 2007. 

"The satisfactory resolution of this matter provides greater clarity and certainty in the marketplace and is in line with our responsibility for preserving and conserving Fannie Mae’s and Freddie Mac’s assets on behalf of taxpayers," said FHFA Acting Director Edward DeMarco. 

The settlement agreement covers claims between FHA and UBS in the following cases: FHFA v. UBS Americas, Inc.; FHFA v. Ally Financial Inc.; FHFA v. Countrywide Financial Corp.; and FHFA v. First Horizon National Corp.

The settlement is between FHFA and UBS Americas, Inc., UBS Real Estate Securities Inc.UBS Securities LLCMortgage Asset Securitization Transactions Inc., and other named defendants. 

Back in April, the Second Circuit Court of Appeals rejected an attempt by mega bank UBS to get the FHFA’s mortgage-backed securities fraud case against the bank thrown out of court. Two weeks later, a New York federal judge ordered a unit of UBS to produce portions of documents it claimed as privileged to FHFA. 

Of the 18 suits filed in 2011, FHFA has now settled three cases and remains committed to satisfactorily resolving the remaining suits, the agency said Thursday.