Wells Fargo has agreed to sell 52 retail bank branches in three Midwestern states to Flagstar Bank as part of its strategy to cut costs.

The sale includes all 33 branches in Indiana, 14 offices in Michigan, and one location in Ohio, besides four offices in Wisconsin.

Under the agreement, all 490 staff working in these branches will be absorbed by Flagstar.

The transaction, which includes about $2.3bn in deposits, is slated to conclude during the fourth quarter 2018.

Commenting on the deal, Wells Fargo head of community banking and consumer lending Mary Mack said: “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.

“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. We will be working closely with Flagstar over the coming months to ensure a smooth transition and uninterrupted service.”

In January, Wells Fargo announced that it would cut more than 800 locations by 2020 to reduce its branch network down to 5,000.