South Carolina Gov. Nikki Haley said Monday that it was time South Carolina removed the Confederate battle flag from its state capitol grounds, in the aftermath of a shooting that killed nine people at a Bible study at the historic Emanuel AME Church in Charleston.

"The events of this past week call upon us to look at this in a different way," Haley said. In the aftermath of a shooting apparently motivated by white supremacy, even as South Carolina's state flag and the American flag were lowered to half-staff, the Confederate flag continued to fly.

The flag hasn't come down just yet. Removing it requires a two-thirds vote of both houses of the legislature.

Haley nodded to supporters of the flag in her speech, saying that for many, the flag was "a way to honor ancestors who came to the service of their state during the time of conflict. That is not hate, nor is it racism."

The history, though, is clear: from the Civil War through the civil rights movement, the flag has always been about white supremacy. The only thing that has changed is how the rest of the country sees the cause it represents.

The Confederate flag has always been about white supremacy

The Confederacy itself was founded to preserve slavery and promote white supremacy (see, for example, Mississippi's declaration of secession: "Our position is thoroughly identified with the institution of slavery — the greatest material interest of the world," or the speech from the Confederacy's vice president that declared the Confederacy's cornerstone "rests upon the great truth that the Negro is not equal to the white man; that slavery — subordination to the superior race — is his natural and normal condition").

And from the moment the design of its best-known flag was proposed, some Southerners began imbuing it with the symbolism of their cause.

The flag was based on the saltire, a common flag symbol sometimes called the Southern cross. As historian John Coski writes in The Confederate Battle Flag: America's Most Embattled Emblem, Southerners weren't shy about enlisting the design in the cause of white supremacy. In 1863, the editor of the Southern Literary Messenger wrote that the flag's Southern cross pointed to "the destiny of the Southern master and his African slave" — the Confederacy's hoped-for expansion of slavery into Latin America.

Like other vestiges of the Confederacy, the flag outlived the Civil War. At first, white Southerners mostly displayed it at Civil War cemeteries and at memorials and veterans' reunions. That use of the flag is the crux of the "heritage, not hate" argument: that the Confederate flag is simply about honoring the South's past, its dead, and its culture.

As a white woman who still flies the flag in a historically black South Carolina neighborhood put it, it's about "family history."

But the flag's meaning was never really innocuous. "Family history" only became a plausible rationale because of a devil's bargain. In the interest of reuniting white Americans, the narrative around the Civil War changed in its aftermath. And the new story was more flattering to the South.

As historian David Blight has argued, the invented memory brought together white Northerners and Southerners to emphasize the valor, courage, and sacrifice of soldiers on both sides. Slavery was sidelined as the war's primary cause in favor of the vaguer term "state's rights" (the right to own slaves). The war became a national tragedy, not a just cause. Reconstruction was not a failed attempt at racial equality, but a dangerous mistake.

Those are the kind of historical interpretations that make the Confederate flag seem like a harmless symbol of regional heritage. It's how Mississippi and Florida could include the Confederate flag in their state flags during the 1890s with little fuss. But while white Southern women were draping the flags on the gravestones of the fallen in the early years of Reconstruction, Coski writes, an armed militia of white supremacists in South Carolina was marching with the Confederate battle flag to threaten black residents.

The "heritage, not hate" argument is predicated on this national amnesia. And that amnesia came at the expense of black Americans.

The flag became a cultural symbol when white Southerners started to feel threatened

The Confederate flag began enjoying unprecedented national popularity and became a cultural symbol after World War II, just as the federal government began trying to make good on its Reconstruction-era civil rights promises.

In the early 1950s, stock car racers, Southern universities, and social groups embraced the Confederate flag, Coski wrote in his book. It's this kind of use of the Confederate flag that has made it a cultural marker, shorthand not just for the Confederacy but for a specific strain of white Southern culture.

But it's not a coincidence that white Southerners were embracing the Confederate battle flag just as the South's system of violently enforced white supremacy was under its first real threat since Reconstruction. President Truman had vowed to do more to promote civil rights, integrating the military and telling the NAACP that civil rights could not wait.

In response, the Ku Klux Klan surged. Southern politicians displayed the Confederate battle flag when they railed against Truman. College students who supported Strom Thurmond's segregationist presidential campaign in 1948 waved Confederate flags at campaign events. The flag even became popular in the North: a man purchasing the flag in New Jersey told Life he was doing it to oppose Truman.

And when Southerners at the time said the flag represented their culture, they made it very clear whose culture they meant: "It means the Southern cause," Roy Harris, a legendary Georgia politician, said in 1951, according to Coski's book. "It is becoming … the symbol of the white race and the cause of the white people."

Somewhat puzzlingly, in the same report that featured the anti-Truman flag buyer in New Jersey, Life wrote off the flag's popularity as a fad. But black newspapers didn't buy it: "Have we so soon forgot what the Confederate flag represents?" Coski records the Afro-American, a nationally prominent black newspaper, as asking. "The Confederate flag stands for slavery and human degradation. The Confederate flag stands for rebellion and treachery. The Confederate flag stands for bloodshed and segregation."

The flag's supporters didn't buy the fad theory, either. "If displaying the flag of the Confederate States of America is a fad, it is one of the longest-lived fads in history, lasting some 90 years," one sniffed in a letter to Life.

The civil rights movement made the flag's meaning crystal clear

The civil rights movement didn't change the flag's meaning — it simply made the hate underlying the heritage more explicit. After the Supreme Court's decision in Brown v. Board of Education, white Southerners used the Confederate flag to intimidate civil rights activists and demonstrate states' willingness to protect segregation at all costs.

The flag no longer represented just a 19th-century battle to preserve white supremacy, but a 20th-century one as well.

The KKK waved the Confederate flag. So did the Citizens' Councils, white supremacist groups of prominent and successful people who opposed integration. White mobs at the University of Alabama carried Confederate flags when they threw rocks at Autherine Lucy, the university's first black student, before the university decided to expel her rather than protect her. Mobs fighting to protect segregated schools wore Confederate flags in Little Rock and New Orleans and Austin and Birmingham.

Some Southerners argued that white supremacists who waved the flag as they violently attacked civil rights activists were perverting the flag's true meaning. A New York Times editorial published two days after four girls were killed in the bombing of the 16th Street Baptist Church claimed segregationists were committing "desecration" of the Confederate symbol.

But what the flag symbolized hadn't changed. Its message had just become less respectable.

When Southern states gave the flags pride of place in their capitols, it was to signal support for segregation. The same Georgia state legislature that considered closing the state's schools rather than integrating them also changed the state flag to include the Confederate symbol. Alabama Governor George Wallace — who promised to fight for "segregation now, segregation tomorrow, segregation forever" — began flying the Confederate flag when Attorney General Robert F. Kennedy came to Alabama in 1963 to discuss integrating the state's universities. The South Carolina state Capitol began flying the flag in 1962 and never stopped.

South Carolina became the epicenter of Confederate flag conflict

If the legislature follows Haley's wishes to move the flag, it will end a conflict that's been going on for more than 40 years.

Black South Carolinians have been asking for the flag's removal since 1972, and it's been a formal demand of the legislature's Black Caucus since 1977. In 1994, the legislature seriously considered a compromise, but it later fell apart.

In the 2000 Republican primary, both George W. Bush and John McCain were asked what should be done about the flag. They said it should be left up to South Carolina, a position for which McCain later apologized.

''I don't believe [Confederate] service, however distinguished, needs to be commemorated in a way that offends, that deeply hurts, people whose ancestors were once denied their freedom by my ancestors,'' McCain said.

In 2000, the legislature reached a compromise after 50,000 people marched to demand the flag be taken down and the NAACP declared a boycott. The flag was moved from the Capitol dome to the most prominent spot on the Capitol grounds, near a monument to Confederate soldiers. When it was taken down from the Capitol dome, some flag supporters chanted, "Off the dome and in your face."

When crafting the compromise — which made the flag more visible to visitors than it had been before — legislators did their utmost to ensure the flag couldn't be pushed out any further.

The law requires the flag to be hoisted 30 feet from the ground, illuminated at night, and surrounded by "an appropriate decorative iron fence." Moving it or removing it requires a two-thirds majority vote.

The flag's stubborn hold on the state isn't just the result of an ironclad compromise that makes it all but impossible to take down. It's a symbol of how successfully the Civil War has been misremembered so that "heritage" and "hate" could be disentangled from each other.

The Confederate flag was adopted to represent a short-lived rebellion to extend and protect white supremacy and black slavery. For 75 years, it was used as a reminder of the nobility of that cause. Then it became a symbol of resistance to black civil rights leaders and to the federal government that was finally trying to enforce the law of the land.

As recently as 2011, Haley dismissed concerns about the flag, saying she thought the state had moved on. And in her statement, she acknowledged South Carolinians who insist — despite history's evidence to the contrary — that the flag is not a racist symbol.

"The hate-filled murderer who massacred our brothers and sisters in Charleston has a sick and twisted view of the flag, Haley said. "In no way does he reflect the people in our state who respect, and in many ways, revere it."

But that reverence now stops at the capitol grounds.

Watch: The Charleston shooting is part of a long history of anti-black terrorism

Correction: An earlier version of this article said Alabama's state flag includes the Confederate flag. While it includes the saltire, or Southern Cross, it never included the full battle flag.