An exterior view of the Emanuel AME, where nine people were killed in Charleston, S.C. (John Taggart/EPA)

Over its 199 years as a black landmark in the birthplace of the Confederacy, Emanuel AME had been tried — repeatedly — by the acts of God and the malice of its neighbors. It was burned. Forced underground. Destroyed by an earthquake. Smashed by a hurricane.

Each time, Emanuel came back. The same church that had birthed a slave rebellion in 1822 survived to incubate the civil rights movement in Charleston in the 1950s and ’60s.

But then the existential threats seemed to fade. Presidential candidates paid visits. The roiling city that tried to kill Emanuel became a pastel-colored diorama for tourists. Church leaders worried that Emanuel would become only a monument to the past.

“We don’t see ourselves . . . as just a place where we come and worship, but as a beacon. And as a bearer of the culture, and a bearer of what makes us a people,” Clementa Pinckney, the church’s pastor and a Democratic state senator, said in a speech from 2013. He added: “We don’t like to see our church as a museum, but as still a place of change.”

On Wednesday evening, however, malice came back.

Read the victims’ stories

Nine members of Emanuel — including Pinckney — were fatally shot during Bible study at the church. Police said the killer was a 21-year-old white man from another part of South Carolina, motivated by racial hatred.

On Thursday in Charleston, people wondered what that meant about their city, their church and their neighbors.

“What are we going to do now? Get metal detectors for a church door?” said Neka Legere, 54, tending an empty hotel bar a few blocks away. “It makes me so ill that I haven’t been able to eat.”

At one prayer circle near the church, a reporter for MSNBC heard one distressed mourner speak to the Almighty: “If we’re not safe in the church, God, you tell us where we are safe.”

Emanuel is the oldest African Methodist Episcopal church south of Baltimore. On Thursday, President Obama called it a “sacred place,” because its walls — and its fragile protection as a holy place — allowed black worshipers a freedom of speech and thought that they might not have enjoyed on the street outside.

“There is something particularly heartbreaking about a death happening in a place in which we seek solace and we seek peace, in a place of worship,” Obama said. He continued, using the old church’s nickname: “Mother Emanuel is, in fact, more than a church.”

William Dudley Gregorie, a Charleston city councilman who is a trustee of Emanuel, said Thursday that the congregation will recover in the manner it has always done: “Bury our dead, start the healing process, continue to pray.”

A day after nine people were killed at Emanuel African Methodist Episcopal Church in Charleston, S.C., people gathered at Morris Brown AME Church for a midday prayer service. (The Washington Post)

“And forgive,” he added, “so that we can cleanse, move forward and make sure that Mother Emanuel continues to be the lifeline of African Americans in the city of Charleston, our state and our country. Because our church is just that significant in the history of our country.”

The church traces its beginning to the early 1800s, when whites and blacks worshiped in the same churches in Charleston — and Christianity was at times used to reinforce the dominion of one over the other. “Slaves were taught the words of St. Paul: “Servants, obey your masters,” said a PBS project on that period.

In Charleston, some black parishioners broke off. One of their leaders was Denmark Vesey, a former slave who taught very different lessons, based on the Old Testament story of Exodus, where God freed the Israelites from bondage.

In 1822, Vesey sought to organize a slave revolt in Charleston. He was found out, arrested, convicted and hanged. His church was burned.

The state, deeply alarmed, went further: it set up a military installation nearby, to guard against future slave revolts (the installation later became an early site of The Citadel, South Carolina’s military college). And South Carolina law forced all-black churches underground.

There was a worry, one historian wrote, “that slaves would not grasp the distinction between spiritual and temporal equality.” Meaning the vast difference between being equal in the eyes of God — and being equal in South Carolina.

The Charleston AME church would not be resurrected until after the Civil War. Then it was destroyed again by an earthquake, and rebuilt in 1891.

The current building is white, and imposing, with a tall steeple and a 100-year-old pipe organ. Emanuel is a rare black landmark in a historic downtown that has been — for tourist purposes — frozen at the peak of white Charleston’s historic power and influence, on the eve of the attack on Fort Sumter.

“It’s not just a church. It’s also a symbol . . . of black freedom,” said Robert Greene, a graduate student who studies the 20th-century South at the University of South Carolina. “That’s why so many folks are so upset tonight, because it’s a church that represents so much about the rich history and tradition of African Americans in Charleston.”

That status has long made Emanuel a destination for those seeking an audience with black Charleston.

It has hosted speeches by Booker T. Washington, Martin Luther King Jr., Jesse L. Jackson and Al Sharpton. Presidential candidates, seeking voters in this early-primary state, have stopped in as well.

“I grew up in that church. So many people have. It was part of growing up with politics,” said Fatima Molette, 53, who works in human relations for the Charleston Police Department. “We’d have debates and candidate forums. There was always something.”

The church’s congregation had shrunk in recent years, according to media coverage: it fell from about 3,500 at its peak to about 900 in 2010. Its parishioners shifted to the suburbs, its neighborhood gentrified, and its battles faded into the past.

The arsenal set up to guard against slave revolts became an Embassy Suites. They put up a statue of Denmark Vesey — the slave-revolt leader — near The Citadel’s new campus.

Inside Emanuel AME’s historic building, the everyday life of a church went on.

“Very, very deliberate, reflective kind of worship style. They’re not contemporary. They do have a couple contemporary choirs but they take pride in their history and tradition,” said Pastor Stephen Singleton, 54, who was pastor from 2006 to 2010. He is currently at a church in Columbia, S.C. “Women wear their hats. In the wintertime, they wear their furs and men wear suits. That’s the attire, that’s how it is.”

The church’s announcements, posted online, show an old church still in motion. There was a Bible-trivia-and-bingo night for seniors, every third Wednesday. The flower guild was in need of volunteers. The elevator fund was in need of donations.

And on Wednesday nights, there was Bible study in the church basement.

“Is something missing from your life? Are you doing all you can to have a closer relationship with God?” the announcements said. “We look forward to seeing you!”

That was the moment the killer chose.

Even after 199 years of suffering and trouble, Emanuel AME’s door was open.

George Campbell, an elderly African American from Charleston, rode his bicycle to a street corner near the church to show his support. “It’s a church,” said Campbell, who attends Greater Macedonia AME a few blocks away. “They can’t lock the doors.”

Fahrenthold and Kaplan reported from Washington. Janell Ross and Joe Heim in Washington, and Anne Gearan in Charleston also contributed to this report.