Washington Federal said Thursday it had agreed to buy from Bank of America 51 branches in four Western states, including 19 in Eastern Washington.

It’s the largest acquisition in the Seattle-based banking company’s history, said Washington Federal CEO Roy Whitehead.

When the deal closes as expected in the fourth quarter, the assets of Washington Federal, already the largest bank headquartered in the state, will swell to about $15 billion. And the bank’s workforce will grow by more than 20 percent to nearly 1,800 employees in eight states.

Bank of America put the branches up for sale earlier this year as part of its sweeping restructuring. Washington Federal has been looking for opportunities to grow through acquisitions in states where it already has branches, including Oregon, Idaho and New Mexico.

Unlimited Digital Access. $1 for 4 weeks.

The branches being acquired are in those three states and Eastern Washington, where Washington Federal hasn’t had a presence.

“We couldn’t pass up the opportunity to do it in one fell swoop,” Whitehead said.

The branches are in smaller markets such as Walla Walla; Boise, Idaho; and Hood River, Ore. — the kinds of towns Washington Federal’s Whitehead sees as the bank’s sweet spot.

The branches represent approximately $1.8 billion of deposits and $11 million of loans, the company said.

While the purchase price wasn’t disclosed, Washington Federal said it paid a premium of 2.6 percent on the deposits. The bank also will pick up $10.9 million in loans.

The company said it expects the deal to pay for itself in less than two years. The deal is subject to approval by regulators.

Washington Federal also said it has completed its conversion to a national bank charter, and announced earnings of $37.3 million or 36 cents per diluted share.

The company said it will offer jobs to all the BofA employees at the affected branches.