An struggling South Carolina bank is being bought out.

Rock Hill-based Provident Community Bancshares Inc. has agreed to be sold to Charlotte's Park Sterling Corp., which is looking to make deeper inroads in the Palmetto State.

The buyout is valued at $6.5 million.

Park Sterling CEO Jim Cherry said the deal will increase the expansion-minded North Carolina lender's presence in the Upstate and Midlands markets. Provident Community Bank has eight branches in York, Fairfield, Winnsboro, Laurens and Greenville counties.

"Our proposed merger ... advances our vision to create a regional community bank in the Carolinas and Virginia and strengthens our leading position in the attractive Charlotte metro market," Cherry said in a statement.

Park Sterling has had one branch in Charleston region since 2011.

The bank will pay $1.4 million in cash, or about 78 cents a share, to Provident Community stockholders. It also would pay $5.1 million to buy back the preferred stock the Rock Hill lender issued to the U.S. Treasury under the federal Troubled Asset Relief Program after the 2008 financial crisis. That's about 45 percent less than what the government paid.

Provident Community Bancshares stopped paying dividends on the TARP shares in 2010 to conserve cash.

Last month, the holding company deregistered its stock and ceased reporting its finances to the Securities and Exchange Commission to cut the legal, accounting and administrative costs associated with being a publicly traded business.

The bank hasn't had a profitable year since 2007, when the last U.S. recession began. Since then, the cumulative losses at Provident Community have been $26.3 million through 2013.

The South Carolina bank's website said it's been in business for more than 75 years.

Lud Vaughn, chief operating officer for Provident Community, told the news website today that the sale "puts us where were were working to be much quicker."