Donald Trump’s flirtation with the Ku Klux Klan should come as no surprise. He has functioned for years as a rallying point for “birthers,” conspiracy theorists, extremists and racists who are apoplectic about the fact that the country elected a black man president. These groups have driven the Republican Party steadily rightward, helping to create a national discourse that now permits a presidential candidate to court racist support without paying a political price.

Every era of racial progress engenders a racist backlash. The one that is still unfolding in the wake of Barack Obama’s presidency bears a striking resemblance in tone to the reaction that swept the South after Reconstruction, the period after the Civil War when former slaves were granted constitutional rights and black Americans served in interracial governments that came to power in the former Confederacy.

The sight of former slaves eagerly lining up to vote and electing their fellow citizens to public offices was anathema to Southerners who had justified slavery, and believed that Negroes were not fit to govern because they were not actually persons. And early historians of this period embraced the Southern view that Reconstruction governments were corrupt and incompetently run.

But as the historian Eric Foner has written, Reconstruction was doomed by two developments: Washington’s decision to no longer enforce the rights of African-Americans in the South, and the rise of the Ku Klux Klan and related white supremacist groups that brought to bear “a campaign of murder, assault and arson that can only be described as homegrown American terrorism.”