The third-largest bank based in South Carolina is being snapped up in a cross-border deal.

Greenville-based Palmetto Bancshares Inc., the holding company for The Palmetto Bank, announced Wednesday that it’s being acquired by United Community Banks Inc. of Blairsville, Ga., for about $240 million in cash and stock.

Palmetto has $1.2 billion in assets, making it the No. 3 South Carolina-based bank owner behind South State Corp. of Columbia and Charleston’s Carolina Financial Corp.

The Palmetto Bank has 25 branches in nine counties along the Interstate 85 corridor. It’s been in business for about 108 years.

The deal would expand United Community’s reach into South Carolina. The bank has $7.7 billion in total assets and 104 offices in Georgia, the Carolinas and Tennessee.

“Palmetto is a uniquely attractive platform for us to accelerate our growth in Upstate South Carolina,” said Lynn Harton, president and chief operating officer of United Community.

The sale is expected to close by the end of the year.