Wells Fargo agreed to sell 52 retail bank branches in Indiana, Michigan, Ohio and Wisconsin to Flagstar Bank. The sale is part of Wells Fargo’s plan to reduce its retail locations to approximately 5,000 branches by the end of 2020, through consolidations and divestitures.

The sale includes $2.3 billion in deposits and $130 million in loans, while all 490 branch team members will receive offers of employment from Flagstar.

Flagstar will pay an effective deposit premium of approximately 7% based on balances as of December 31, 2017. Flagstar management expects the transaction will be moderately accretive to 2019 earnings per share.

“We are very pleased to reach this agreement with Flagstar, as they are committed to providing excellent service to our customers and providing a great workplace for our team members,” said Mary Mack, head of Community Banking and Consumer Lending at Wells Fargo. “As we continue to reduce our branch network, we believe this sale to Flagstar will result in the best outcome for customers, team members and other stakeholders in these markets.”

The transaction is expected to close in Q4/18, subject to customary regulatory approvals. The branches to be acquired will operate as Wells Fargo branches until closing and will be re-branded as Flagstar branches immediately afterward.

At closing, Flagstar expects to have 151 branches in the Midwest and eight in California. The deal will bring liquidity that the bank can use to repay short-term Federal Home Loan Bank advances.

Law firm Skadden, Arps, Slate, Meagher & Flom advised Flagstar on the transaction.