“You rape our women, and you’re taking over our country. And you have to go.” That’s what gunman Dylann Storm Roof reportedly declared before murdering nine African-Americans at the Emanuel African Methodist Episcopal Church in Charleston, South Carolina, on Wednesday. Some have speculated that Roof chose the historic black church—and even the date of his horrific deed—because it was co-founded by Denmark Vesey, a former slave who was hanged for planning to lead a slave revolt in Charleston on June 16, 1822.

That's according to some historical accounts, but Joseph Kelley's 2013 book America’s Longest Siege: Charleston, Slavery, and the Slow March Toward Civil War, suggests that Vesey never plotted any such revolt. Instead, he may have been the victim of racist paranoia, much like the nine African-Americans whom Roof has confessed to murdering. Racism is a form of imagination, not just of domination. And across our history, whites have imagined blacks conspiring against them.

Denmark Vesey arrived in the United States as a teenager on a slave ship in 1781. Noticing the young man’s “alertness and intelligence,” the ship captain made Vesey his cabin boy and eventually his manservant in a well-appointed Charleston home. Vesey learned to read and write English and also spoke some French, both hallmarks of high status in South Carolina’s slave community.

Vesey’s status changed abruptly in 1799, when he won $1,500 in a local lottery. He used $600 to purchase his freedom; then he married a free woman of color named Susan, who was about 30 years his junior. And shortly after that, Denmark and Susan Vesey joined the African Methodist Episcopal Church.

The AME had been founded by Philadelphia’s Richard Allen, who resented the racism and consdescension of white Methodists. Clearly, Charleston’s two AME congregations represented a threat to white supremacy. When Allen came to preach in Charleston in 1818, 140 black congregants were arrested for violating a city ordinance against worshipping without a white person present.

But they continued to do so in private homes like the Veseys’, where Denmark occasionally preached. Given the AME’s emphasis on the Old Testament’s Exodus tale, where God frees the Israelites, it would not be surprising if Vesey used his pulpit to denounce slavery.

But did he plot a wide-scale rebellion? The charge dated to an 1822 conversation between two slaves in the Charleston Harbor, after they spotted a ship bearing a flag that referred to the recent slave revolts in Haiti. One of the slaves then told his master about the discussion, which led fearful South Carolina authorities to interrogate and torture the other slave. Was he aware of any Haitian-style rebellions being plotted in South Carolina?

The anguished slave denied any such knowledge for a week, but broke after his torturers threatened to hang him. Yes, he finally said, there was a plot. But its leader was a conjurer who possessed a charm that made him “invulnerable,” the slave said.

The authorities then interrogated several other blacks in Charleston, who initially implicated one of the state governor’s slaves. According to one informant, the governor’s slave planned to march on Charleston with an army of 4,000 and “kill all the whites.” And “when we have done with the fellows,” the leader was reported to have said, “we know what to do with the wenches.”

We still don’t know how South Carolina officials found their way to Denmark Vesey, because he was tried in secret. But at least one slave apparently told authorities that he heard Vesey speak of a “large army from St. Domingo [that is, Haiti] and Africa,” which gives you a sense of the wild tales that were spun around him.

Indeed, the story of Denmark Vesey embodied almost every deep fear in the racist white mind. There’s Haiti, site of the biggest slave revolt in the New World. There’s a free man of color, who by his very freedom seems to threaten white supremacy.

Then there’s the African Methodist Episcopal Church. After Vesey and 34 other alleged conspiracists were hanged, the AME church that he attended was burned to the ground. Revived after the Civil War, it was destroyed in an earthquake in 1891 and then rebuilt yet again.

And it retained its status as a symbol of black freedom, which might be why Dylann Roof targeted it this week. Like Denmark Vesey’s tormentors, he believed that African-Americans were plotting wanton violence against white people. For most of our history, of course, it’s been precisely the opposite. But in the racist imagination, blacks are always just a heartbeat from domination. They’re taking over the country. And they have to go.