KBW has survived a number of hardships over the years, including the death of a third of its staff in the 9/11 attacks.

In the end, the 50-year-old New York investment banking firm best known as Keefe, Bruyette & Woods fell victim to rote ailments that have wrecked many of its bank customers — a lack of diversification and a crippling slowdown in business. Going public may have exacerbated its problems.

KBW, which agreed to sell itself for $575 million in cash and stock to Stifel Financial on Monday, was the No. 2 advisor in bank mergers acquisitions by number of deals through Sept. 30. It trailed Sandler O'Neill & Partners; Stifel was No. 3.

Sandler and KBW have an intense and complicated rivalry. Both lost considerable staff on Sept. 11, and each has struggled with the historic slump in bank M&A in recent years.

Sandler has pulled ahead this year in the all-important bank M&A league tables partly because it stayed private, having sold a minority stake to the private-equity firms Carlyle Group and Kelso & Co. in 2010. That gave it the capital to expand while ensuring that any financial problems stayed out of the limelight.

KBW went public in 2006, a decision that ultimately proved fatal by funding a poorly timed expansion and opening up the firm to additional scrutiny.

Image is everything on Wall Street. KBW's very public financial problems (it lost $3.1 million in the third quarter) have cost it clients, talent and prestige.

While KBW has been forced to consolidate office space, lay off more than 100 people and get out of asset-management, rival Sandler just moved into a larger space in a nicer part of Manhattan. Sandler has also been winning more deals and more high-profile deals, including co-representing BankAtlantic Bancorp (BBX) in the sale of its banking operations to BB&T (BBT) and Pacific Capital Bancorp in its pending sale to Mitsubishi UFJ Financial Group.

KBW lost a team of Boston-area investment bankers in 2009 to Sterne Agee & Leach.

Oriental Financial Group, which KBW advised on a failed-bank acquisition in 2010, hired

Jefferies to handle its $500 million agreement in June for Banco Bilbao Vizcaya Argentaria's Puerto Rican banking operations.

KBW has had management issues, too. In 2000, then-CEO James McDermott Jr. was convicted of insider trading for leaking information about five bank mergers.

John Duffy, who rebuilt the firm after 2001, resigned as chief executive in October 2011, citing health problems. His successor, Thomas Michaud, told American Banker in June that "if somebody chooses to acquire the company I want to make sure they pay the highest and fairest price possible."

KBW was founded in 1962. It became one of the first, if not the first, independent investment banks to specialize in bank M&A. Business soared as deregulation of interstate banking led to a boom in bank M&A. It became dominant in that field because it had access to reams of banking companies' financial statements in a pre-Internet age, as it had started as a community and regional bank investment research specialist.

Duffy himself advised on deals that created Capital One Financial (COF), Bank of America (BAC) and other large institutions.

Sandler advised on 25 bank and thrift deals worth $3.7 billion through the third quarter, while KBW advised on 23 deals worth $1.9 billion, according to SNL Financial.

Subscribe Now

Access to authoritative analysis and perspective and our data-driven report series.

14-Day Free Trial

No credit card required. Complete access to articles, breaking news and industry data.