Bangor Savings Bank plans to merge with New Hampshire’s Granite Bank in a $45 million deal that would make the combined bank a contender for the title of the largest based in Maine.

The deal is expected to close in the second quarter of next year, pending approval by regulators and shareholders.

This is the second foray into the Granite State by the Bangor-based mutual bank, which earlier this year opened a limited service branch in Portsmouth offering mortgage and other lending along with payroll services. A mutual bank is owned by its members rather than stockholders.

Granite Bank’s parent, First Colebrook Bancorp Inc., is a public company based in Colebrook, New Hampshire. Its shareholders still must vote to approve the deal.

The Federal Reserve Board, the Federal Deposit Insurance Corp. and state banking departments of New Hampshire and Maine also will need to approve the deal, according to Scott Cooper, president and CEO of Granite Bank.

First Colebrook and Bangor Savings’ parent, Bangor Bancorp, said the merger agreement was unanimously approved on Oct. 23 by the boards of directors of both parent companies and their respective banks.

“Regulatory approval takes several months. We hope the transaction will close by next April or May at the latest,” Bangor Savings CEO Bob Montgomery-Rice told the Bangor Daily News. “Then the First Colebrook Bancorp and Granite state names will go away, and they will become Bangor Bancorp and Bangor Savings.”

Granite has no branches in Maine, but operates one in Portsmouth that will remain along with Bangor Savings’ operation there. He said there are no plans to close any branches, but rather to expand later.

With the acquisition, Bangor Savings will add four branches to its current 55.

Montgomery-Rice said Bangor Savings made the deal because both banks operate in rural and urban markets and he liked how Granite approached its customers.

Bangor Savings in 1998 acquired 28 former Fleet Bank locations and in 2015 several Pepperell Bank & Trust locations as part of its ongoing plan to expand into southern Maine.

If the deal is approved, shareholders of First Colebrook Bancorp will receive $45 in cash for each share of First Colebrook Bancorp stock.

Following the merger, the combined banks would have more than $4 billion in assets and 59 branches in Maine and New Hampshire.

That would bring them neck-in-neck with Maine’s current largest bank by assets, Camden National, which had just over $4 billion in assets in June 2017, according to rating website USbanklocations. Bar Harbor Bank & Trust, which in January bought Lake Sunapee Bank Group in Newport, New Hampshire, is third at $3.5 billion.

Bangor Savings Bank is constructing a multimillion-dollar corporate campus on the waterfront in Bangor. Slated for completion in November 2018, it will consolidate several existing sites and house more than 350 employees, with the potential for 500 total, to be added over the next three to five years, Montgomery-Rice said.

Bangor Savings is working with the city of Bangor to change the street name of the new campus from South Street to Hamlin Way to reflect the name of its founders, including Elijah Hamlin, he said.