Photo

Bank of America is paying $6.3 billion to settle a lawsuit arising out of troubled mortgage-backed securities it cobbled together and sold to Fannie Mae and Freddie Mac in the run-up to the financial crisis.

The bank agreed on Wednesday to pay that sum to settle a lawsuit filed on behalf of the two government-sponsored mortgage finance firms by their regulator, the Federal Housing Finance Agency. As part of the settlement, Bank of America will also repurchase mortgage securities from Fannie and Freddie that are valued at about $3.2 billion.

The agreement covers what are known as private-label mortgage-backed securities sold by Bank of America and its affiliated entities like Countrywide Financial and Merrill Lynch.

Bank of America said the settlement with the housing regulator was expected to reduce its first-quarter income by about $3.7 billion before taxes. The bank is scheduled to report its earnings on April 16.

The settlement with the housing finance agency is the latest in a string of deals that regulators have reached with big banks that sold mortgage securities backed by subprime mortgages, which quickly soured during the housing and financial crises.

Including this latest settlement, the housing finance agency has recouped $16 billion in cash payments from banks and financial firms that sold mortgage-backed securities.

The regulator, which filed 18 lawsuits, still has claims pending against seven banks and financial institutions.

The conclusion came on the same day as Bank of America and its former chief executive, Kenneth D. Lewis, reached a deal to resolve another lawsuit arising from the financial crisis.

Mr. Lewis, who stepped down in 2009, agreed on Wednesday to pay a $10 million penalty to settle a lawsuit arising out of the bank’s acquisition of Merrill Lynch at the height of the financial crisis.

Companies often have insurance policies to cover the actions of corporate officers. Mr. Lewis would be entitled to seek indemnification from the bank for his portion of the settlement under that policy, said a person with knowledge of the matter but who was not authorized to speak publicly.

The settlement between Mr. Lewis and New York’s attorney general, Eric T. Schneiderman, also bars the former bank executive from serving as an officer or a director of a public company for three years. Mr. Lewis, a Wall Street deal maker who also oversaw Bank of America’s acquisition of the troubled mortgage lender Countrywide Financial, has kept a low profile since stepping down.

Bank of America also reached a settlement with Mr. Schneiderman’s office in which the bank will pay $15 million. In addition, the bank agreed to institute a number of corporate governance changes, including the creation of a corporate development committee to monitor acquisition activities for the next five years.

The lawsuit, filed by Andrew M. Cuomo, the New York governor, when he was still the state’s attorney general, charged that Mr. Lewis and other bank executives misled Bank of America shareholders about the financial problems facing Merrill Lynch when the acquisition was announced in September 2008. The lawsuit said shareholders were not told that Merrill Lynch was facing up to $9 billion in losses, most of it tied to write-downs on the value of collateralized debt obligations backed by troubled mortgage securities.

The settlement with Mr. Schneiderman’s office was first reported by Reuters.

Bruce E. Yannett, a lawyer for Mr. Lewis, said in a statement that the former bank executive “is proud of the role he played in helping the U.S. banking system survive a very challenging period in its history.”

The ill-timed acquisition of Merrill Lynch has led to much litigation and pain for Bank of America. Last year, Bank of America agreed to pay $2.4 billion to settle a securities class-action lawsuit over the merger brought on behalf of the bank’s shareholders. In 2010, the bank reached a $150 million settlement with the Securities and Exchange Commission to settle similar accusations that it had misled shareholders about the Merrill Lynch transaction.

“I would hope this closes one chapter of our ongoing efforts to ensure the frauds that occurred in and around the financial crisis are not forgotten,” Mr. Schneiderman said in a prepared statement.