Church bells tolled in unison and hymns echoed through church halls on Sunday in a moving show of solidarity that underlined the continuing power of religion in American life.
Since Dylann Roof allegedly shot dead six women and three men at a local church on Wednesday evening, Charleston, S.C., has responded with a grace and unity that has left the country, and the world, in awe.
In perhaps the most remarkable moment of the past four days, relatives of the shooting victims told Mr. Roof at his first court hearing on Friday that they forgave him despite the hurt they were feeling.
In a time that has seen anger and upheaval from Baltimore to Ferguson, Mo., over how police deal with black Americans, Charleston's reaction to last week's crime stood out.
That spirit of forgiveness even in the face of the worst imaginable crime owes much to a Christian tradition that is especially strong in the South.
"There is probably nothing more central to Christian theology than the idea of forgiveness and grace," said Lacy Ford, a history professor at the University of South Carolina.
"In an hour of just monstrous wrong, the families of the victims I think bore witness to the influence of that message in a way that has been enormously powerful. It has shaped the response to the shooting and in some ways helps people recover from an act of malice and hatred."
In the first service at the Emanuel African Methodist Episcopal church since the shooting, Rev. Norvel Goff told the congregation on Sunday morning that "We have shown the world how we as a group of people can come together and pray and work out things that need to be worked out."
A mixed group of blacks and whites held hands, rocked and swayed to hymns and then embraced as the two-hour memorial came to an end. At the hour of 10, church bells around what residents call the Holy City tolled together from the spires that crowd Charleston's horizon.
The church's pastor, Clementa Pinckney, who was also a state senator, was one of the victims of Wednesday's racist killings. The church covered his empty seat behind the podium in black cloth.
Mourners have been gathering for days outside the church, known as Mother Emanuel because of its storied history as a pillar of black American life. Since the days of slavery, churches have been a place of solace and sanctuary for black Americans.
"The church has always been an outlet for grievances, a place for people to express their pain, a place for people to have hope under lynching and segregation and hardships," said Dimas Salaberry, 42, a New York pastor who came to Charleston to pay his respects. "Even if you were a street sweeper, when you walked into a church you were somebody."
Over the generations, black churches have been everything from refuges for escaped slaves to the headquarters of the civil rights movement. A free black shoemaker, Morris Brown, founded the Emanuel church in 1816 after breaking with the mainly white local Methodist church. The church was later burned after authorities uncovered a slave-revolt plot, then rebuilt.
Today black Americans remain extraordinarily attached to their churches. A report by the Pew Research Center last month found that while the proportion of Americans who describe themselves as Christians has dropped to about 70 per cent in 2014, "the size of the historically black Protestant tradition – which includes the National Baptist Convention, the Church of God in Christ, the African Methodist Episcopal Church, the Progressive Baptist Convention and others – has remained relatively stable in recent years, at nearly 16 million adults."
Black churches perform a host of community services, from tending the homeless to running Bible camps. Abraham Salley, 30, a minister at the New Laurel Street Missionary Baptist Church in Columbia, S.C., said his church hands out 300 Thanksgiving baskets a year.
Like many of those who have been gathering at the Emanuel church, he said something good might come out of the Charleston tragedy. "God is using this moment, this defining moment in our history, to get us together – and that means all the people. If you take a glance out here you've got people from all ethnic groups and races."
Some black Americans are shifting to suburban megachurches and abandoning old-style downtown churches as they move up to the suburbs. But the message does not change. "We're all one people and we're going up to one heaven, doesn't matter if you're black or white or Asian or any kind. We should all get along down here or how are we going to get along there," said Michelle Walker, 50, who attends a big church in the Columbia suburbs.
What isn't often mentioned amid all the talk of unity since the Emanuel shooting is that black and white Americans mostly worship apart. A Pew Research survey estimated that roughly eight out of 10 churchgoers go to services dominated by a single ethnic or racial group.
Still, shared faith seems to have been a unifying force in Charleston, where blacks and whites have been mourning side by side in front of the church.
In the three days since the massacre, churches around the city, the state and the country have been holding vigils and memorials. Mourners have come from all over. One mainly white church in Princeton, N.J., linked up with a mainly black church in New York's South Bronx to send a delegation of nine to Charleston.
They started organizing the trip Friday morning and were on a plane by 1 that afternoon.
Tracy Troxel, 52, associate pastor at the Stone Hill Church of Princeton, said he believed it was important to respond to the killing not with anger but with a demonstration of togetherness and forgiveness. "Forgiveness is a massive tool to deal with the injustice and brokenness of the world," he said.