Kevin McCoy and Kevin Johnson

USA TODAY

Bank of America Thursday agreed to pay $16.65 billion to resolve allegations it sold toxic mortgage-backed securities and other financial products in the lead-up to the financial crisis — the largest civil settlement ever between a single firm and the U.S. government.

Announced by federal and state officials in Washington, the deal requires the nation's second-largest bank to pay $9.65 billion in cash and provide $7 billion for consumer relief, such as reducing mortgage payments for struggling homeowners and funding neighborhood stabilization efforts.

The cash payment includes a $5.02 billion civil penalty to the Department of Justice, and $4.63 billion in compensatory remediation payments. The compensatory payments are expected to be tax-deductible, softening the financial impact on the bank.

Additionally, the Securities and Exchange Commission said Bank of America agreed to admit wrongdoing and pay $245 million to resolve securities fraud charges filed last year related to residential mortgage backed securities.

Much of the activity covered by the settlement occurred in Countrywide Financial, the mortgage company the bank bought in 2008, and Merrill Lynch, the brokerage the bank also acquired during the financial crisis.

"This historic resolution — the largest such settlement on record — goes far beyond 'the cost of doing business,'" said Attorney General Eric Holder, explaining that the deal resolves "more than a dozen cases and investigations" by the Department of Justice, attorneys general in six states and several federal financial agencies.

"Bank of America has acknowledged that, in the years leading up to the financial crisis that devastated our economy in 2008, it, Merrill Lynch, and Countrywide sold billions of dollars of RMBS (residential mortgage-backed securities) backed by toxic loans whose quality, and level of risk, they knowingly misrepresented to investors and the U.S. government," added Holder. "These loans contained material underwriting defects; they were secured by properties with inflated appraisals; they failed to comply with federal, state, and local laws; and they were insufficiently collateralized. Yet these financial institutions knowingly, routinely, falsely, and fraudulently marked and sold these loans as sound and reliable investments. "

Shares of Bank of America (BAC) jumped more than 4% in Thursday trading, closing at $16.16 as investors appeared to react to the sweeping resolution of investigations that shadowed the bank for months.

The Charlotte, N.C.-headquartered bank said the settlement is expected to reduce its third-quarter pre-tax earnings by $5.3 billion and negatively affect earnings per share by approximately 43 cents per share after taxes.

"We believe this settlement, which resolves significant remaining mortgage-related exposures, is in the best interests of our shareholders, and allows us to continue to focus on the future," bank CEO Brian Moynihan said as federal and state officials outlined the settlement at a Washington news conference.

Despite the settlement's breadth, Bank of America said it does not cover potential criminal claims or claims against individuals. The bank also said it would pursue an appeal of the July federal court ruling that required it to pay nearly $1.3 billion for a program that caused heavy losses to federally-backed mortgage finance giants Fannie Mae and Freddie Mac amid financial crisis fallout.

U.S. District Judge Jed Rakoff in New York City imposed the fine on the bank's Countrywide Financial unit for risky mortgages sold through a program informally dubbed "The Hustle" or "The High Speed Swim Lane." Rakoff's ruling also ordered Rebecca Mairone, a bank employee involved in running the loan program, to pay $1 million for her role.

The settlement was hammered out during months of negotiations between lawyers for Bank of America and Department of Justice prosecutors — as well as direct talks between Holder and Moynihan.

The agreement marks the latest in a series of Department of Justice legal actions focused on financial institutions whose marketing and sale of risky mortgage-backed securities contributed to a real estate market collapse amid the 2008 financial crisis.

The largest previous settlement involved JPMorgan Chase (JPM), which in November agreed to pay $13 billion and admit it sold billions in toxic mortgage investments.

Similarly, Citigroup (C) in July agreed to a $7 billion settlement over similar Department of Justice allegations.

For Bank of America, the record-breaking settlement significantly boosts the more than $60 billion that the Charlotte, N.C.-headquartered bank has already spent to resolve legal issues stemming from the financial crisis. No other U.S. bank has spent more.

Cumulatively, the nation's largest six bank holding companies by assets have agreed to pay more than $107 billion for credit crisis and mortgage-related settlements, according to data compiled by SNL Financial, a provider of financial data and analysis.

Despite the size of the new settlement, some consumer groups have criticized the lack of detailed data on investor losses linked to the mortgage-selling scheme, as well as an absence of charges against specific bank officials. Dennis Kelleher, president and CEO of Better Markets, a financial watchdog, earlier this month called on Department of Justice officials to provide that information.

"Why are we charging the stockholders instead of going after the people who did wrong? Corporations don't engage in criminal behavior. They don't take advantage of innocent people. People do," Dick Kovacevich, former Wells Fargo chairman and CEO, told CNBC Thursday.

However, federal officials may pursue a civil lawsuit against Angelo Mozilo, co-founder of Countrywide Financial, for alleged improper actions related to the financial crisis, The New York Times, Bloomberg News and other media organizations reported.

Additionally, the U.S. Public Interest Research Group, a national consumer organization, on Monday questioned why portions of the Bank of America settlement would be tax-deductible.

"To understand how significant the BofA settlement really is, people need to ask how many billions the bank is allowed to write off as tax deductions, and how much of the announced figure includes 'fake costs' — costs the bank would have incurred anyway to protect its bottom line," said Phineas Baxandall, the consumer group's senior analyst.