Already the subject of some sizeable mortgage-related settlements in the past five years, Bank of America announced on Aug 20 that it has agreed to pay the Department of Justice (DOJ) close to $17 billion – the largest civil settlement with a single entity in American history—to settle multiple state and federal investigations into the way it packaged and sold mortgage-backed securities on the run up to the financial crisis. In addition to federal probes, the settlement will end investigation pending from the attorneys general of California, Delaware, Illinois, Kentucky, Maryland and New York.

The settlement ends probes aimed at not only Bank of America but also its Countrywide Financial Corporation and Merrill Lynch subsidiaries. Close to $10 billion of the total will address the various state and federal investigations of the banking group, $5 billion of which will directly address fines levied at the bank under the Financial Institutions Reform, Recovery and Enforcement Act.

Related Stories:

Top 10 most expensive discrimination settlements of 2013

Bank of America settles with Fannie Mae and Freddie Mac for $9.3 billion

Bank of America reaches $500 million settlement with investors

“This historic resolution – the largest such settlement on record – goes far beyond ‘the cost of doing business,’” said Attorney General Holder. ”Under the terms of this settlement, the bank has agreed to pay $7 billion in relief to struggling homeowners, borrowers and communities affected by the bank’s conduct. This is appropriate given the size and scope of the wrongdoing at issue.”

That $7 billion will go towards defraying tax liabilities resulting from mortgage modifications, as well as helping customers with forbearance and forgiveness.

In addition to the fines the bank has also agreed to acknowledge a statement of facts, stating that it sold billions in residential mortgage-backed securities while omitting key facts about the quality of the assets to investors. An independent monitoring agency will be assigned to BoA to confirm that the company meets its settlement obligations.

“Bank of America failed to make accurate and complete disclosure to investors and its illegal conduct kept investors in the dark,” said Rhea Kemble Dignam, Regional Director of the Securities and Exchange Commission’s (SEC) Atlanta Office. “Requiring an admission of wrongdoing as part of Bank of America’s agreement to resolve the SEC charges filed today provides an additional level of accountability for its violation of the federal securities laws.”

While the settlement does not absolve individual employees from potential civil action, it does end the ongoing risk of litigation for the company.