The merger agreement of two South Carolina-based banks in a deal worth more than $300 million was announced Wednesday.