On Wednesday night, Dylann Roof, a 21-year-old white man, walked into a prayer meeting at Charleston’s Emanuel African Methodist Episcopal Church. For an hour, he sat and listened to Clementa Pinckney, a South Carolina state senator and Methodist pastor at the church. Then he opened fire, killing nine, including Pinckney.

Emanuel African Methodist Episcopal is one of the oldest black churches south of the Mason-Dixon line, and its long history is intertwined with the struggle for civil rights. Among its founding members was Denmark Vesey, a free black man, who in 1822 plotted a slave revolt. The church remained a center of the black community after the Civil War, through the long decades of Jim Crow, and down to the present day.

To find out more, I turned to Douglas Egerton, a professor of history at Le Moyne College, and author of He Shall Go Out Free: The Lives of Denmark Vesey and The Wars of Reconstruction: The Brief, Violent History of America's Most Progressive Era. What follows is a condensed transcript of our conversation.

Appelbaum: Why was it important for blacks in the antebellum South to have their own churches in which they could worship, free of white supervision or control?

Egerton: The message that black slaves and freemen were getting was not what they wanted to hear. White church leaders stayed away from stories they would find dangerous: the Exodus, the brotherhood of all man.

More than that, when the A.M.E. church was founded in Charleston, it was the center of the black community. It was a church, it was a school, despite it being closed down because they were teaching literacy. It’s why the authorities regarded the A.M.E. church as so dangerous.

Appelbaum: In 1822, Denmark Vesey is accused of plotting a slave revolt. He is one of 35 executed. How does that change the way that the church is viewed?

Egerton: The two main ministers knew something was going on, but were not complicit. One person said that Morris Brown counseled Vesey not to do this, because the risks were too high.

Because the church was the center of black cultural autonomy in Charleston, because it taught literacy, it was targeted by the authorities. The church was closed routinely: 1818, 1819, 1820.

Had there been no attacks on the church, there would’ve been no conspiracy. Slaves are never happy being slaves, but they have to weigh the odds. Even in a state that is 61 percent black like South Carolina, there are armed white militias. John C. Calhoun was the secretary of war, and prepared to use overwhelming force.

Appelbaum: How do the attacks on the church push Vesey into open revolt?

Egerton: It made it very clear that whites were never going to give them any sort of autonomy. In 1818, when the church is closed down, one of Vesey’s friends goes to Sierra Leone, and Vesey thinks of going. Then he decides he’s going to stay and see what he can do for his sons—he has sons who are still enslaved by his first two wives. Vesey is 54. His friends call him the old man—the average life expectancy for blacks at this time was 34 years. He wants to free slaves, and take them to live in Haiti.

Appelbaum: What happens to the church?

Egerton: It’s razed—literally burned down. The two ministers are actually put on trial because they have left the state to attend a conference. There’s a law that free blacks cannot leave South Carolina. The mayor effectively exiles the ministers to Philadelphia.

The congregation splits up. They worship underground. Some of them go to white congregations.

Appelbaum: When the church was rebuilt in 1865, the carpenter who designed it was Denmark’s son, Robert Vesey Sr. What role does it play in Reconstruction era Charleston?

Egerton: It’s a focal point for political organization. For most white politicians in the nineteenth century, they come out of law, they come out of business—these are the venues that give them a leg up. For blacks, the church is pretty much it. It is their place to congregate, to organize. And a large number of Union army chaplains get involved in organizing. They start organizing chapters of the Union League as a stepping-stone to political organization, which invariably meet in black churches. And that is why churches all across the south are constantly being attacked, being torched.

There are 1,510 identifiable people of color who hold political office in the south during Reconstruction. Disproportionately, they are veterans—and the largest single group, 243, are ministers.

For whites who don’t want to share political power, the churches become the targets. You can stop political movements through terror and through violence. One black congressman at the time, Robert Smalls, estimates 53,000 black political activists have been assassinated. That’s more than the people who died at Gettysburg.

A Methodist minister from Charleston, Benjamin Franklin Randolph, is assassinated in 1868 as he gets on a train. He was a state senator. It is not a coincidence that Clementa Pinckney, the minister who was killed yesterday, was also in the state senate. It’s the old mixture in South Carolina of religion and politics.

Appelbaum: Then the hopeful experiment of Reconstruction comes to an end. What role does the church play in the long decades of Jim Crow?

Egerton: They don’t abandon the struggle. There’s a march in 1969 that starts in the church. It remains the focal point for political struggle. People talk about Reconstruction ending; to a large extent it doesn’t. Whites give up, but blacks continue to fight on. And that continues to the present. Emanuel AME has a reputation as a church that is trying to keep the struggle alive.

Appelbaum: What is it about the existence of independent black congregations that has made them such targets?

Egerton: It allows for a kind of independence and autonomy and a launching point for political activity that some reactionary, supremacist whites don’t want.

The original plan for Denmark Vesey’s uprising is July 14, Bastille Day. It is moved back to midnight on June 16—they plan to free the slaves, and fight their way down to the docks—meaning the fighting will be on June 17. Historians don’t like coincidences. Either it’s a terrible coincidence, or he knows this history. The fact that June 17 would have been the day of the fighting is troubling.

Whites still refer to Vesey as a terrorist in Charleston; he was fighting for freedom. It looks like the terrorist was this young white man who shot up the church.