In a rushed bid to ride out the storm sweeping American finance, 94-year-old Merrill Lynch & Co. agreed late Sunday to sell itself to Bank of America Corp. for $50 billion.

The deal, worked out in 48 hours of frenetic negotiating, could instantly reshape the U.S. banking landscape, making the nation's prime behemoth even bigger. Late Sunday night, the companies' boards had approved the deal, but lawyers were negotiating over last-minute details.

Driven...