First Citizens BancShares agreed to buy Silicon Valley Bank which was seized by regulators following a run on the lender.

The Raleigh, North Carolina-based bank entered into a purchase and assumption agreement for all deposits and loans of SVB, according to a statement from the Federal Deposit Insurance Corp. The deal includes the purchase of about $72 billion SVB assets at a discount of $16.5 billion, the FDIC said.

About $90 billion in securities and other assets will remain in the receivership for disposition by the FDIC, while the Federal institution also got equity appreciation rights in First Citizens worth as much as $500 million. The estimated cost of the failure to the Deposit Insurance Fund is about $20 billion, though the exact extent will be determined when receivership is terminated, according to the statement.