While it will still be years before Bank of America (BAC -1.07%) is completely clear of legal liability related to the financial crisis, it's now officially in the homestretch.

The Charlotte-based bank announced on Wednesday that it will pay the Federal Housing Finance Agency $9.5 billion to resolve all of the latter's outstanding securities fraud claims. The settlement is split between $6.3 billion in cash and $3.2 billion for the repurchase of mortgage-backed securities.

Coupled with a large settlement from last April, Bank of America estimates it has "now resolved approximately 88% of the unpaid principal balance of all RMBS as to which RMBS securities litigation has been filed or threatened for all Bank of America-related entities."

It's for this reason the press release announcing the deal proclaims it concludes "one of the most significant remaining pieces of RMBS securities litigation facing the company."

To be clear, this is not an exaggeration. Over the past few years, Bank of America has had to deal with three separate buckets of legal liability.

The first involved so-called representation and warranties claims. The essence of these was that Bank of America -- or, more accurately, Countrywide Financial -- defrauded institutional investors and bond insurers by placing defectively originated home loans into mortgage-backed securities.

Through a series of settlements with private investors, custodial banks, monoline insurance companies, and Fannie Mae and Freddie Mac, these actions had largely been resolved by the end of last year.

The second bucket contained liability related to the servicing of mortgages. These were the so-called robo-signing cases in which Bank of America was accused of submitting fraudulent documents in foreclose proceedings. Their resolution came at the beginning of 2012 via the aptly named National Mortgage Settlement with multiple state and federal agencies.

Finally, the third bucket held securities fraud actions like the ones at issue here. While a large portion of these were dealt with in the middle of last year, via a settlement with institutional investors, two groupings remained. The largest included the FHFA's claims which are now resolved. The other is principally composed of claims between the insurance giant AIG (AIG -0.45%) and Bank of America.

My point in all of this was not to bore you. It's rather to demonstrate that Bank of America is indeed nearing the finish line when it comes to legal liability dating back to the financial crisis.

Does this mean that it's completely done with this unfortunate chapter? Absolutely not, as there will continue to be smaller settlements trickle in here and there. But what it does mean is that, with Wednesday's announcement, the bank has cleared the final major hurdle.

In short, Bank of America's investors can now rest easy knowing the end is in sight.