Two of the white-gloved troopers crossed the decorative fence that has long stood around the pole. Soon one of them was turning a crank inserted into the pole and the flag began to descend. The crowd cheered. It took less than 30 seconds for the flag to come down. It will now be housed at the Confederate Relic Room and Military Museum, a state-supported museum near the State House.

By late afternoon the flagpole was removed, too.

Though the matter of the flag was settled for now, some matters of history were not. Robert Hines, 65, of Sumter County, came in a broad-brimmed hat and white blazer, clutching little rebel flags on sticks.

“We had 22,000 South Carolinians die under the flag,” he said, including one of his ancestors. They were fighting for “constitutional rights,” Mr. Hines said, and not slavery.

Image John Blankenship of Granite Falls, N.C., waited for the flag to come down. Credit... Stephen B. Morton for The New York Times

In fact, even the vice president of the Confederacy, Alexander Stephens, once called the slavery question the “immediate cause” of the Civil War. Mr. Hines said such ideas were “a symptom of political correctness and mind control” perpetrated by a liberal media.

“If you ever give the people of South Carolina a referendum, the flag will go back up,” he said.

But the crowd was mostly dominated by people of various races who were joyous and relieved that the flag would be off the State House grounds.

Malissa Burnette, a Columbia resident, clutched a little American flag as she watched the rebel flag shoot down the flagpole. Ms. Burnette, who is white, began to sob.