With a dark past and complicated present, race relations have always been a challenge in Charleston, the city where police say a young white man shot nine people to death at a historic black church.
The city along the South Carolina coast was once a major slave port and the site of the first shots in the Civil War. A century later, it also served as a hub for civil rights activists who frequently gathered at the church, Emanuel African Methodist Episcopal.
Progress in recent decades has included the rise of the black middle class, but pockets of poverty still exist and gentrification has pushed some black residents out as newcomers flock to trendy neighborhoods.
"Charleston gives the impression that it's a progressive, cosmopolitan city, and to a certain extent that's true," said Bobby Donaldson, an associate professor of history at the University of South Carolina. "But the problems continue, maybe not as visible, maybe not as glaring, but they are quite real."
Historians say that while Charleston may not have received the same spotlight as other southern cities during the civil rights-era, it was active in the movement.
The city's first sit-in was held in 1960 over refusal of lunch-counter service, and there were economic boycotts of stores that wouldn't serve or hire blacks, said Jon Hale, a civil rights historian at College of Charleston.
"It was peaceful in that you didn't have a church burning or you didn't have a Bull Connor," said Hale, referring to the segregationist Birmingham police leader.
Charleston was the first city in South Carolina to desegregate its schools after a judge's 1963 ruling. It was a frequent destination for the Rev. Martin Luther King Jr., who preached at Emanuel. Septima Clark, a voter registration leader for the Southern Christian Leadership Conference, lived in Charleston and worked throughout the South.
The city's largest civil rights protest came after 400 mostly black hospital workers walked off their jobs to seek better pay and working conditions. The 1969 strike included a march by an estimated 5,000 people.
Some residents said there were still lingering racial tensions.
"It is great that we've all come together and that we're trying to make a difference as one, whites, blacks, men and women. But it's still very tense," Dorothy Nicole Marshall, a black Air Force veteran, said outside the church.
In the 19th century, racial violence was intertwined with the history of Emanuel. A church founder, Denmark Vesey, was hanged after trying to organize a slave revolt in 1822, and white landowners burned the church in revenge, leaving the congregation to worship underground until after the Civil War.
The state built a military post to prevent future rebellions, and it eventually became the Citadel military college, Hale said.
Civil rights advocates argue progress has been hindered by the state's continued flying of a Confederate battle flag on the grounds of its Statehouse. The practice is once again drawing fire in light of the Confederate insignia displayed on the car driven by the suspected gunman.
The area was also thrust into international headlines earlier this year when an unarmed black man was shot to death by a white police officer after a traffic stop in neighboring North Charleston. Ex-officer Michael Slager has been charged with murder.
Charleston's complicated relationship is underscored by the fact that College of Charleston, the site of a Friday night prayer vigil, is led by Civil War re-enactor and enthusiast Glenn McConnell. The Charleston native with a thick southern drawl was perhaps the Confederate flag's most ardent supporter during his tenure in the state Senate. He once deemed removing the flag from the Statehouse as "cultural genocide."
South Carolina was the last state to fly the Confederate battle flag from its Capitol dome until in 2000 it was moved to a 30-foot flagpole in front of the building.
Pat Sullivan, a professor of history at the University of South Carolina, noted that the flag is prominently placed in the city near where suspect Dylann Roof was living. The flag was hoisted above the Statehouse in 1962, at the height of the civil rights movement.
"The flag flying on the Statehouse property is in a place of honor," Sullivan said. "In the '60s it came up in that space in defense of segregation."
Among those who have called for removal of the flag is Charleston Mayor Joseph P. Riley Jr., who joined a 2000 march on the Capitol by nearly 50,000 people who wanted it taken down.
On Friday, Riley said that in his 40 years in office he's tried his best to improve race relations in the city. He pointed out that Charleston is building the International African American Museum near the water where many slaves took their first step on American soil to walk to the market to be sold.
"It will be a place of healing," Riley said.
Associated Press writers Jeffrey Collins and Emily Masters in Charleston, South Carolina, contributed to this report.