Harleysville’s advisers shopped the bank around as they tried to raise capital to help it deal with credit issues.

Banks in the mix included People’s United, New York Community Bancorp and M&T Bank, according to a source familiar with the matter. It ultimately agreed to be bought by First Niagara for $237 million

The bank also tried to raise capital from private equity sources but those did not bear fruit.

“After careful consideration, we found that the transaction with First Niagara was clearly the best alternative at this time, and a better alternative than raising private equity capital,” Harleysville Chief Executive Paul Geraghty wrote in an email to employees.

For First Niagara, the deal may not be the last. “I think in this kind of environment, there will be multiple opportunities to further explore and consider,” Chief Executive John Koelmel told Reuters reporter Archana Shankar in an interview.