What are we to make of the horror in Charleston?

Wednesday night’s shooting at historic Emanuel AME Church conjures the type of terror suffered by a previous generation. And it adds yet another page to the nation’s long and halting racial narrative, which as often as not seems to leaven progress with pain.

It comes at a moment when a resurgent civil rights movement grips the nation. That struggle, with its Black Lives Matter catchphrase and raucous social-media-empowered legions, is about stemming police violence and pushing the criminal justice system to treat African Americans equally.

For many, the Black Lives Matter movement is picking up the unfinished work of activists who fought for equal voting rights five decades ago. That era was also punctuated by deadly violence. The massacre in Charleston evokes the 1963 bombing of Birmingham’s 16th Street Baptist Church, which killed four black girls who were attending Sunday school less than three months after the March on Washington, one of the seminal events of that era’s civil rights movement.

“We’ve made a lot of progress, but this shooting does open up old wounds,” said Rick Wade, a South Carolina native who advised President Obama’s campaigns in the state, went on to serve as a top Commerce Department official and now heads the international Harves Investment Group. “Certainly there are no attack dogs or colored-only signs now, and we have a black president. Still, are we in denial about the pervasiveness of the racial divide in America? And how do we fix that?”

As a student at integrated Lancaster High School in the late 1970s, Wade, now 52, ran for black student body vice president, a post that served alongside the white vice president. By the time he was a senior, he was elected president of the entire student body, which was predominantly white.

It is the kind of small step that heartens many Americans, even as it enrages a set of extremists angry about the country’s direction. Many of their acts seem as pathetic as they are hateful: painting racial slurs on a rock in front of a high school; distributing Klan literature; handing out racist fliers; burning a cross in the yard of two black women.

Still, from time to time, the hate turns deadly.

As the gunman at Emanuel unleashed the nation’s deadliest episode of racial violence in decades, he reportedly complained that he was angry about blacks and other minorities taking over the country.

Organizations that track hate groups know that demographic trends putting the nation on course to no longer be majority-white before mid-century have become an obsession for white supremacist groups that operate on the fringes of society. Their numbers are up sharply since the turn of the century, experts say.

In a report this year, the Southern Poverty Law Center found that between April 2009 and February 2015, there was a domestic terrorist attack or a foiled attack in the country on average every 34 days. They were most often motivated by race or ethnicity.

“The number-one thing talked about on white supremacist Web sites is the changing of America,” said Heidi Beirich, head of the SPLC’s Intelligence Project.

Dylann Roof, the young man arrested in the shooting, appeared on his Facebook page wearing a dour expression and a jacket adorned with small flags from Rhodesia (now Zimbabwe) and South Africa — countries where white minorities once dominated black majorities.

Only the gunman knows for sure why he chose Emanuel for the deadly outburst. Jack Levin, co-director of Northeastern University’s Brudnick Center on Violence and Conflict, and the author of several books on hate crimes and mass murder, speculated that the shooter knew that a black church would be a place that offered a large number of potential victims.

Whatever the case, the shooting brings together unfortunate strands in the nation’s history. The African Methodist Episcopal Church exists because of historical white resistance to treating black worshipers on equal terms — and a willingness to enforce those divisions with violence. Emanuel AME was led by a South Carolina state senator, the Rev. Clementa Pinckney, who was killed in the shooting. That the carnage took place at a South Carolina institution founded in part by a man later hanged for planning a slave insurrection only makes the tragedy resonate more painfully.

“Mother Emanuel is, in fact, more than a church. This is a place of worship that was founded by African Americans seeking liberty,” Obama said. “This is a church that was burned to the ground because its worshipers worked to end slavery.”

The church rose from the ashes after being burned, with parishioners meeting in secret. Decades later, members reestablished the church at its current location in downtown Charleston. In 1865, Richard H. Cain took Emanuel’s helm, helping its membership to grow to more than 4,000 and creating a base for a political career that eventually saw him elected to Congress during Reconstruction.

In the aftermath of the tragic church bombing in Birmingham, the city was on edge. There was rioting, and the night after the explosion, two black men were killed by whites. Still, when the Rev. Martin Luther King Jr. arrived to eulogize the fallen girls, he spoke of better days.

“These tragic deaths may lead our nation to substitute an aristocracy of character for an aristocracy of color,” King said. “The spilled blood of these innocent girls may cause the whole citizenry of Birmingham to transform the negative extremes of a dark past into the positive extremes of a bright future.”