$50bn deal comes after weekend that changed the face of Wall St

Under the deal, Bank of America will pay about $29 for each Merrill Lynch share. Merrill, hit by toxic mortgage credit, has written down more than $40bn of assets over the past year.

The deal came after Lehman Brothers announced it would file for bankruptcy protection, and AIG sought an emergency sale of assets.

"Acquiring one of the premier wealth management, capital markets, and advisory companies is a great opportunity for our shareholders," said Bank of America chairman and chief executive Ken Lewis. "Together, our companies are more valuable because of the synergies in our businesses."

Three Merrill Lynch directors join the board of Bank of America.

"Merrill Lynch is a great global franchise and I look forward to working with Ken Lewis and our senior management teams to create what will be the leading financial institution in the world with the combination of these two firms," said John Thain, Merrill's chairman and chief executive.

The deal is expected to be completed early in 2009, subject to shareholder and regulatory approval.