First Community in Lexington, S.C., has agreed to buy Cornerstone Bancorp in Easley, S.C.

The $915 million-asset First Community said in a press release Thursday that it will pay $25.8 million in cash and stock for the $144 million-asset Cornerstone. The deal is expected to close in the fourth quarter.

“This is a natural extension of our company in the Greenville market, which we entered with the activation of our loan production office in" March 2016, Michael Crapps, First Community's president and CEO, said in the release.

Rodger Anthony, Cornerstone's chairman and CEO, will serve in a consulting role for six months after the deal is completed.

First Community was advised by Hovde Group and Nelson Mullins Riley & Scarborough. Cornerstone was advised by Raymond James and Haynsworth Sinkler Boyd.