NEW YORK (AP) — New York Community Bank has agreed to buy a significant chunk of the failed Signature Bank in a $2.7 billion deal, the Federal Deposit Insurance Corp. said late Sunday.

The 40 branches of Signature Bank will become Flagstar Bank, starting Monday. Flagstar is one of New York Community Bank's subsidiaries. The deal will include the purchase of $38.4 billion in Signature Bank's assets, a little more than a third of Signature's total when the bank failed a week ago.

The FDIC said $60 billion in Signature Bank's loans will remain in receivership and are expected to be sold off in time.

Signature Bank was the second bank to fail in this banking crisis, roughly 48 hours after the collapse of Silicon Valley Bank. Signature, based in New York, was a large commercial lender in the tristate area, but had in recent years gotten into cryptocurrencies as a potential growth business.

After Silicon Valley Bank failed, depositors became nervous about Signature Bank's health due to its high amount of uninsured deposits as well as its exposure to crypto and other tech-focused lending. By the time it was closed by regulators, Signature was the third largest bank failure in U.S. history.

The FDIC says it expects Signature Bank's failure to cost the deposit insurance fund $2.5 billion, but that figure may change as the regulator sells off assets. The deposit insurance fund is paid for by assessments on banks and taxpayers do not bear the direct cost when a bank fails.