Supporters of the Ku Klux Klan and the Black Panthers clashed outside the South Carolina Capitol in Columbia on Saturday.
The South Carolina Department of Public Safety reported five arrests. Seven people were transported by ambulances for medical treatment.
Both the Loyal White Knights of the KKK and the New Black Panther Party held rallies on the statehouse grounds.
The KKK rally in support of the Confederate flag came a week and a day after the flag was removed from outside the Capitol building.
"The Confederate flag does not represent hate. A lot of Americans died for that flag," one member of the KKK said, according to CNN affiliate WOLO.
As the day went on, tensions grew between protesters and counter-protesters.
State police placed themselves between opposing sides, but skirmishes still erupted. At one point, a group of people grabbed a Confederate flag and started ripping it apart.
Authorities shut down the rally an hour early to disperse the crowd they estimated at 2,000 people.
CNN's Christine Sever contributed to this report.
By Ed Payne