The Confederate battle flag still flies above the grounds of the South Carolina State Capitol five days after a gunman who had adopted it almost as a personal crest invaded a black church in Charleston and killed nine parishioners. Unlike the state and national flags, which were lowered to half-mast out of respect for the victims, the Confederate flag flies fully and proudly—locked literally in place both by an actual padlock and by a state law forbidding it from being taken down or altered in any way.

Most salvos in the ensuing debate about the flag—whether it symbolizes heritage or hatred—treat its continued prominence in Southern society as a vestigial legacy of the Civil War. “Put it in a museum,” wrote The Atlantic’s Ta-Nehisi Coates the day after the shooting. “Inscribe beneath it the years 1861-2015.”

Yet few have paused to ask: Why is the Confederate battle flag even up at the state Capitol, and since when has it been there?

It is far from the case that the Confederate battle flag has flown over the South Carolina State Capitol since the day in April 1861 when Confederate troops within the state’s borders fired the first shots of the Civil War. Actually, if you look at the history of the Confederate flag since the Civil War—as The Nation’s archive enables you to do—you realize that the presence of the flag at the Capitol today is a vestige not of 19th-century secessionism but of 20th-century segregationism.

It followed the custom of the day that Union troops confiscated the enemy’s battle flags at the end of the Civil War. They were stored at the War Department in Washington, DC, for over two decades before President Grover Cleveland, assenting to the casual suggestion of an army official, ordered the flags returned to the respective Southern states whose regiments they represented. Cleveland was the first US president after the Civil War who did not serve—he, like Lincoln himself, hired a substitute to serve instead—and had already made a few plays for Southern support (in cabinet nominations, for one thing) that had won him the ire of fervent Union veterans and the Northern politicians who pandered to them. (They were known as “bloody shirts,” i.e., those who hysterically invoke past martyrs to justify a current position—virtually a national pastime today.) The announcement that the Confederate battle flags would be returned to Southern states rendered Union partisans apopleptic. The head of the Grand Army of the Republic, the organization of Union vets, said of Cleveland’s order: “May God palsy the brain that conceived it, and may God palsy the tongue that dictated it!”

Realizing the political peril he had put himself and other Democrats in, Cleveland quickly rescinded the order.

The Nation, which had been founded by Republicans but led the “Mugwumps” in supporting Cleveland in 1884, wrote about “The Battle-Flag Flurry” in its main editorial in the issue of June 23, 1887:

The day will surely come when Americans will cease to treasure memorials of the humiliation and defeat of a large body of their own countrymen, which is what captured rebel colors really are. But we fear the day has not come yet, and that in consenting to surrender them, without any special demand or occasion for it, the President has done more to supply the “bloody shirt” screamers with material for execrations than the Southerners with reasons for loving the restored Union. Captured colors, we admit, differ from soldiers’ monuments and the like, in being the civilized equivalent of scalps, but they are nevertheless things which every man who has served in the field and feels military traditions, prizes highly, and we think the part of wisdom would have been—as it has been the sober second thought of the President—to let the Confederate colors stay where they are a little longer, or until the reign of peace in the hearts of the “soldier element” in politics is somewhat more complete.

So The Nation supported Cleveland’s ultimate decision not to turn over the flags, but only because going through with the transfer would have been politically inexpedient for Cleveland and his allies. Earlier in the editorial, the editors had expressed the wish that “such memories of the war as divide the North from the South should die out as speedily as possible, seeing that the object of the war was peace and unity.” Twenty years earlier, when the magazine was decidedly more radical and more under the influence of its early abolitionist founders and backers, it would have argued that the object of the war was the preservation of the democratic experiment in America and the eradication of slavery and all legal distinctions between races; after turning against Reconstruction in the late 1860s and early 1870s, The Nation took the view that debating the legacy of the Civil War was much less important than ensuring reconciliation between North and South.

In the 1887 editorial about the Cleveland controversy, the editors quoted approvingly Virginia Governor Fitzhugh Lee, who had been a Confederate cavalry general during the war and was the nephew of General Robert E. Lee: “The country should not again be agitated by pieces of bunting that mean nothing now. The South is part and parcel of the Union to-day, and means to do her part towards increasing its prosperity and maintaining the peace of the republic, whether the flags rot in Washington or are restored to their former custodians.”

It was safe for a prominent Southern politician to take the position that the Confederate battle flags were “pieces of bunting that mean nothing now” while the national emphasis was on burying the disputes that had caused the Civil War and while the central question at issue in those disputes—whether whites should maintain complete political, social, and economic control over blacks—was being answered resoundingly, by most Americans, in the affirmative. (President Theodore Roosvelt, as it happens, ended up returning the battle flags to the South, to little fanfare or complaint.) It was only in the late 1940s, as the white consensus around that answer began to collapse, that the Confederate battle flag was resurrected as a meaningful and politically potent symbol of the “Lost Cause” that, contradiction of contradictions, needed to be preserved and could still, with God’s good grace, be won.

Coates’ Atlantic colleague Yoni Applebaum wrote in his own recent piece on the history of the flag:

In 1948, the Dixiecrats revolted against President Harry Truman—who had desegregated the armed forces and supported anti-lynching bills. The movement began in Mississippi in February of 1948, with thousands of activists “shouting rebel yells and waving the Confederate flag,” as the Associated Press reported at the time. Some actually removed old, mothballed flags from the trunks where they had until then been gathering dust.

You can actually see this happen in real time in the pages of The Nation. In the issue of September 8, 1951, the editors were surprised to note:

If Jefferson Davis were to travel through Dixie today he would find that nearly one car out of ten on the highways now flies the Stars and Bars defiantly from its radio aerial. Some car owners drape the rear end of their vehicles with full-scale flags, while limousines seem to prefer diminutive windshield stickers….

Stars and Bars buyers seem to have in common a generalized resentment against “everything that’s going on”: prices, foreign policy, taxes, political corruption, and “uppity” Negroes. Needless to say, the South’s eight million Negroes are not buying any Confederate flags, old or new. To them the manner in which the flag is blossoming out these days is a reminder that white supremacy is still the order of the day.

And so it is still. In 1887 Southern politicians declined President Cleveland’s offer to hand over the Confederate battle flags that Union troops had seized at the end of the Civil War because the flags were “pieces of bunting that mean nothing now.” In 1951, with the system of Jim Crow segregationism in jeopardy, the South pulled the flag out of the attic, dusted it off, and displayed it as a symbol of resistance to “everything that’s going on,” not least to the growing demands of black Americans for their rights. The flag was resurrected not to commemorate a cause that had been lost, but to protect a cause that had been won.

“While it is doubtful whether the Dixiecrats or Klansmen are directly responsible for raising the Stars and Bars over most of Dixie,” the Nation editors observed, “there is no doubt that the manner in which the flag is being displayed indicates a climate of opinion that is favorable to both.” We are all still breathing their fetid air.

South Carolina raised the Confederate battle flag above the state Capitol in 1961 on the centennial anniversary of the attack on the federal garrison at Fort Sumter; it was moved to a different flagpole in 2000, but it has never been lowered since.