Shannon Stapleton/Reuters

The price being paid by Bank of America for its missteps during the financial crisis rose sharply on Friday as the bank announced a $2.43 billion deal to settle accusations that it misled investors about the acquisition of Merrill Lynch.

It is the largest securities class-action lawsuit settlement yet to arise from the financial crisis.

Shareholders, led by pension funds, including those in Ohio and the Netherlands, had accused the bank of providing false and misleading statements about the health of the Wall Street firm, which, unknown to the public, was racking up huge losses in late 2008 amid turmoil in the markets.

Bank of America denied the allegations, but said on Friday that it had agreed to settle in order to put the case behind it. “Resolving this litigation removes uncertainty and risk and is in the best interests of our shareholders,” Brian T. Moynihan, the bank’s chief executive, said in a statement.

The settlement, however, may undermine a battle between the New York attorney general and the bank. In 2010, Andrew M. Cuomo, New York’s attorney general at the time, sued Kenneth D. Lewis, the bank’s former chief executive, and Bank of America, contending that the bank and its executives hid from shareholders billions of dollars in losses at Merrill, later causing Bank of America to need a bailout from Washington.

The case, which now falls to Eric T. Schneiderman, could lose much of its steam. Under a decision by New York’s highest court, the attorney general can recover losses on behalf of shareholders. Once the shareholders settle, though, Mr. Schneiderman’s office can expect to obtain little more than a penalty, according to people briefed on the matter. The attorney general’s office declined to comment.

The huge size of the settlement underscores how two deals in 2008 — the Merrill acquisition and the purchase of the mortgage lender Countrywide Financial earlier that year — have weighed on the bank, one of the country’s largest, keeping it from making a full recovery.

The Countrywide acquisition, made as the housing market was collapsing, has now cost Bank of America more than $40 billion in losses on real estate, legal costs and settlements, according to several people close to the bank. That deal alone would have been enough to hobble Bank of America, but coupled with the questionable acquisition of Merrill Lynch, it nearly crippled the institution.

Since 2009, Bank of America has closed bank branches, sold billions of dollars in assets and cut tens of thousands of jobs.

When the deal to buy Merrill Lynch for $50 billion was announced in September 2008, Lehman Brothers was preparing to file for bankruptcy and the American International Group was rapidly crumbling. At the time, Bank of America and Merrill crowed about creating a financial giant unrivaled “in its breadth of financial services and global reach.” Bank of America executives emphasized Merrill’s “great global franchise” and its extensive network of financial advisers. The company said the deal would bolster earnings by 2010.

But by the time the deal closed in January 2009, Merrill Lynch’s health had deteriorated precipitously. Internal calculations showed that Merrill, which was saddled with billions of dollars in souring mortgage assets, had a staggering pretax loss in excess of $10 billion for October and November 2008, and December was looking even worse.

Even as the losses continued to pile up within Merrill, executives were pushing forward to close the deal by January 2009. On Dec. 5, at separate meetings in Charlotte, N.C., and New York, shareholders of each company voted to approve the deal.

What they did not know, shareholders contended, was that just days before that meeting, bank executives worried that Merrill Lynch would have a fourth-quarter loss of at least $16 billion. There was no public disclosure of that internal forecast.

In court documents, lawyers for Mr. Lewis have said that the executive was aware of the mounting losses heading into the shareholder meetings, but that after discussions with lawyers he concluded that an interim disclosure was not necessary because the crucial regulatory filing in support of the merger did not contain projections on Merrill’s fourth-quarter results.

“The losses, though large, were not out of line with losses Merrill had experienced in prior quarters; and investors were well aware that banks were sustaining significant losses as the economy deteriorated,” according to a court filing.

The marriage with Merrill was a rocky union almost from the start. Amid the 2008 market turbulence, John A. Thain, the chief executive of Merrill, privately sought out Mr. Lewis of Bank of America during a break in a crisis meeting at the Federal Reserve Bank of New York in Lower Manhattan. Mr. Thain realized then that his firm was in critical condition and might not survive past the weekend. It was a shotgun wedding, and the two executives announced Sunday night that their firms were merging.

While the deal gave Merrill a much-needed lifeline, the brokerage firm was still hemorrhaging money. As the losses inside Merrill continued to build, some executives inside Bank of America considered abandoning the deal altogether. But regulators urged executives at Bank of America to continue, arguing that a broken deal would cause further turmoil in the already roiling financial system. Instead, Bank of America received a fresh injection of capital to buffer against the Merrill losses.

On Jan. 16, weeks after the deal had closed, the bailout was announced, along with Merrill’s fourth-quarter net loss of $15.31 billion. Shareholders, unaware of the severity of the losses in late 2008, were furious.

Neither Mr. Thain nor Mr. Lewis survived the debacle. A week after the bailout was announced, Mr. Lewis flew to New York from Charlotte to see Mr. Thain, telling him the board blamed him for the losses. Mr. Thain has previously said he viewed this meeting as a firing.

In April 2009, Bank of America shareholders stripped Mr. Lewis of the title of chairman. Later that year, he stepped down as chief executive.

Bank of America later paid $150 million to settle a Securities and Exchange Commission lawsuit that contended the bank did not tell its shareholders about big bonus payments Merrill had approved before the merger closed. For a federal securities class action, the size of Friday’s Merrill settlement is surpassed only by the Enron, WorldCom, Tyco and Cendant settlements, according to Joseph A. Grundfest, a professor of securities litigation at Stanford University Law School.

Bank of America said on Friday that the settlement would hurt its results for its current quarter. Profit will also be hurt by a $1.9 billion adjustment related to the value of its debt. And the bank faces an $800 million charge related to an income tax expense. All told, third-quarter earnings — to be reported on Oct. 17 — will be cut by 28 cents a share, the bank said.

David M. Trone, an analyst with JMP Securities, said on Friday that he expected Bank of America to take a loss in the third quarter of 17 cents a share. Mr. Trone described the settlement in his note Friday as “far larger than we expected.”

It is unclear how much relief the shareholders — those who owned Bank of America shares or call options from September 2008 to January 2009 — will receive. A chunk of the settlement amount will go to the plaintiffs’ lawyers, who are expected to ask the court for $150 million in fees. Bank of America will use its litigation reserves and litigation expenses to cover the settlement, saying that it and other legal expenses cost it $1.6 billion.

The bank also said on Friday that it had agreed to adopt a “say on pay” shareholder vote, an independent compensation committee of the board and policies for committees focused on acquisitions, among other corporate governance changes.

Despite the legal woes, the Merrill Lynch business has helped bolster Bank of America, contributing roughly half the bank’s revenue since 2009, according to bank analysts.

The Countrywide acquisition has proved to be a bigger albatross for Bank of America. The purchase effectively saddled Bank of America with hundreds of thousands of homeowners struggling to keep up with their mortgage payments.

The bank has spent billions of dollars to defend lawsuits related to Countrywide’s mortgage business. In the second quarter of 2011, for example, the bank reported an $8.8 billion loss, mainly related to a settlement with mortgage investors.

Earlier this year, Bank of America and four other banks agreed to a $26 billion settlement related to their foreclosure practices. That deal evolved from an investigation of the mortgage servicing practices by state attorneys general that was begun in 2010 amid mounting fury over revelations that banks evicted homeowners from their residences with false or incomplete documentation.