Lafayette-based MidSouth Bancorp Inc. reported third-quarter earnings that were about half of what the bank reported during the same time period a year ago. It blamed much of the difference on the expenses related to closing seven branches at the end of September.

MidSouth said it had net earnings of $856,000 or 7 cents a share, compared to $1.6 million, or 14 cents a share during the third quarter of 2016.

The bank said it spent $903,000 during the quarter on closing seven branches, with more than half that coming as an after-tax expense. The branches that were closed were in Lafayette, Houma, New Iberia, Cut Off and Jeanerette, along with locations in Houston and Dallas. Jim McLemore, MidSouth president and chief executive officer, said the bank has the sale of two more branches under contract. He did not disclose the branches, but said the deals should close in December.

The bank has said it planned to optimize its network of branches.

MidSouth reported interest and non-interest income of nearly $25.9 million for the quarter, compared to $24.8 million in the third quarter of 2016.

Share of MidSouth were unchanged Tuesday, closing at $13.15.