Citigroup Inc. has become the second — but probably not the last — bank to bow out of the Federal Housing Finance Agency’s mortgage-backed securities litigation onslaught.

Citi revealed in a court filing on Tuesday that it reached a confidential settlement with the FHFA, which serves as conservator for Fannie Mae and Freddie Mac. The deal comes as the FHFA and its lawyers have won a series of rulings bolstering their claims that 18 of the world’s biggest banks duped Fannie and Freddie into purchasing $200 billion in MBS by misrepresenting the quality of the underlying loans.

Here’s the joint stipulation dismissing the FHFA’s claims against Citigroup, signed by Citi counsel Brad Karp of Paul Weiss Rifkind Wharton & Garrison and FHFA counsel Philippe Selendy of Quinn Emanuel Urquhart & Sullivan.

The FHFA unleashed separate suits against the banks almost two years ago, targeting Citigroup along with Bank of America Corporation, JPMorgan Chase & Co, Deutsche Bank AG, UBS AG, and their Wall Street cohorts. The agency’s case against JPMorgan is the largest, with $33 billion in MBS at issue. The Citi case involved a whopping $3.5 billion in securities.

Nearly all the cases were consolidated before U.S. District Judge Denise Cote in Manhattan, who has sided with the FHFA on crucial pre-trial rulings, as we reported here and here. In April, the U.S. Court of Appeals for the Second Circuit affirmed Cote’s rejection of the banks’ hard-fought claims that the cases are time-barred. The defendants, with UBS’s lawyers at Skadden, Arps, Slate, Meagher & Flom and JPMorgan’s at Sullivan & Cromwell in the lead, have also taken the unusual step of filing a mandamus petition at the Second Circuit, arguing that Cote has devised "a grossly inequitable, clearly erroneous framework for litigation that deprives Petitioners of their basic due process rights to confront multi-billion dollar claims."

In leaving the whole mess behind, Citi follows in the footsteps of the financial services firm GE Capital, a division of General Electric Co., which opted to settle with FHFA in January. That case involved $550 million in securities.