Flagstar Bank has reached an agreement to buy assets of Signature Bank, which collapsed over a week ago.

Under the terms of the agreement, Flagstar Bank will take over Signature Bank’s deposits, certain loan portfolios and 40 branches.

Specifically, the transaction included the acquisition of around $38.4bn of Signature Bank’s assets, including loans of $12.9bn purchased at a discount of $2.7bn.

Earlier this month, Signature Bank was put under the receivership of the Federal Deposit Insurance Corporation (FDIC), two days after the California-based Silicon Valley Bank failed.

The FDIC will continue to hold around Signature Bank’s $60bn loans that will be disposed of later.

Flagstar Bank is a wholly owned subsidiary of New York Community Bancorp.

It did not bid for nearly $4bn in deposits related to the former Signature Bank’s digital banking division.

“The FDIC will provide these deposits directly to customers whose accounts are associated with the digital banking business,” the regulator said.

As of last year, Signature Bank had $88.6bn in deposits and $110.4bn in total assets.

The regulator estimates that its Deposit Insurance Fund would incur a cost of $2.5bn due to Signature Bank’s failure.

The news comes as the FDIC tries to sell Silicon Valley Bank too.

First Citizens BancShares is among those looking to buy Silicon Valley Bank but a deal is yet to be finalised.