PORTLAND (AP) — The Bank of Maine has reached an agreement to sell six of its branches in the northern part of the state to Machias Savings Bank.

The transaction affects branches in Caribou, Fort Kent, Houlton, Lincoln, Mars Hill and Presque Isle, with a total of $75 million in deposits as of the end of June.

Machias Savings Bank said it will close the branches in Fort Kent, Houlton and Mars Hill.

The sale is subject to the approval of state banking regulators.

Bank of Maine’s chief executive said the sale will allow the bank to focus on its remaining branches in mid and southern Maine.

Machias Savings Bank’s CEO said the sale is a natural expansion of the company’s existing footprint.