As those of us who were not directly touched by the horrifying massacre in Charleston begin to move on, it’s worth trying to put some of the events in a broader context. How the Republican Party became the dominant party of the Old Confederacy – first benefiting from it, then struggling because of it, and finally distancing itself from one of the Confederacy’s most toxic symbols – is among the more fascinating political stories of modern times.

It starts just over a half-century ago, after President Lyndon Johnson signed the 1964 Civil Rights Act and told an aide, “We have lost the South for a generation.” Actually, it was two generations — and counting.

Prior to the Civil Rights Act, the South was a Democratic stronghold. Democrats held all of the governors’ offices and Senate seats in the region. Yet by 1972, Richard Nixon carried more than 70 percent of the vote in the Deep South. Today, it’s rare to find Democrats holding top political offices in the South. The sweep has been nearly complete.

With a vise-like grip on the South came a large number of electoral votes but also baggage, most especially having to do with the symbols of the Old Confederacy. This was true in South Carolina, where Democrats were responsible for first flying the Confederate flag over the state capitol in 1962 but which Republicans soon became associated with.

The flag became a political problem for Republicans as the nation became more ethnically and racially diverse and less culturally accepting of the symbols of slavery. For several election cycles, Republican presidential candidates refused to criticize flying the Confederate flag on state grounds for fear of losing the South Carolina primary. This stance, however, sent an alienating message to minorities and suburban voters: Key Republicans were publicly agnostic when it came to a symbol of white supremacy and secession. In a rather odd historical inversion, the party of Lincoln became identified with the symbol of slavery.

And then, in the blink of an eye, it was over. An issue in which the battle lines had been long drawn suddenly changed. Why?

As many people have pointed out, the proximate cause was a tragedy: Nine African-Americans gunned down during a Bible Study at Emanuel AME Church in Charleston. The alleged killer, Dylann Roof, is a racist who had been photographed posing with the Confederate flag. But, by itself, that set of facts wouldn’t have changed much at all since no one could plausibly blame the Confederate flag for the massacre.

Something else was at play: The way the people of Charleston responded in the aftermath of the killings. No riots. No violence. No unrest. Instead, there were calls for unity and solidarity. But even that, by itself, would not have been enough.

The key event occurred when the relatives of people slain were able, less than 48 hours after the killings, to speak directly to Roof at his first court appearance. It was a sublime moment. Grieving family members spoke in honest, unaffected ways about the grief and heartache of their loss, and yet they somehow found it within themselves to bestow forgiveness on the man who had killed their beloved.

The people and the politicians of South Carolina, having witnessed this profound demonstration of grace, wanted to find a way to extend it to others. They did. South Carolina Governor Nikki Haley – who had previously rebuffed efforts to remove the flag from the grounds of the state legislature – reversed her position, acknowledging that what had occurred “calls upon us to look at this in a different way.” She added, “By removing a symbol that divides us, we can move forward as a state in harmony and we can honor the nine blessed souls who are in heaven.”

This change in policy didn’t come about because of pressure and coercion and intimidation from without; it arose from a change of heart from within. So powerful was it that other states, including Alabama, Mississippi, and Georgia, took steps to put aside the symbols of the Confederacy.

While not nearly as historically significant and on a vastly smaller scale, there are some parallels to what happened a few weeks ago in Charleston and the Civil Rights era, when the most direct challenge to segregation came from within the Christian tradition and the black church. There was a profound dignity and strength in how those opposing segregation carried themselves.

Martin Luther King, Jr. eschewed violence and spoke instead about justice and love. “The strong person is the person who can cut off the chain of hate, the chain of evil,” King said in a stunning 1957 sermon on loving your enemy. “Somebody must have religion enough and morality enough to cut it off and inject within the very structure of the universe that strong and powerful element of love.”

A few weeks ago, in a courtroom in Charleston, a handful of saints decided to cut off the chain of hate and injected the element of love. In doing so, they moved hearts in a state and a nation. They caused people to alter old assumptions. They changed American politics.

They even changed the Republican Party.

Peter Wehner is a senior fellow at the Ethics and Public Policy Center.