The South Carolina state government held a ceremony to take down the Confederate flag from statehouse grounds July 10. The crowd watching chanted "U-S-A" as the flag was folded. (AP)

The elaborate ceremony Friday to remove the Confederate battle flag from the grounds of the South Carolina statehouse threatened to overshadow the very act of removing a symbol that had caused so much tension and testimony over the state of race relations in recent weeks.

The color guard, the phalanx of elected officials, and the cheering — and sometimes jeering — crowd of spectators all made the event feel at turns like both a state funeral and a pep rally. Neither seemed an entirely appropriate tone for the occasion, given the horrifying circumstances that led South Carolina lawmakers to finally retire the banner that, in spite of controversy, had defiantly held an official place of honor for more than 50 years.

It was the June 17 slayings of nine black people, gunned down while attending Bible study at historic Emanuel African American Episcopal Church in Charleston, that escalated demands to remove the flag. The alleged shooter, Dylann Roof, a 21-year-old self-avowed racist, was photographed displaying the Confederate flag, along with other racist icons. Even then, some leaders of the Republican-dominated state government initially balked, as did Sen. Lindsey O. Graham, a candidate for the GOP presidential nomination. They argued that Roof, not the flag, was to blame for the murders.

[Confederate flag comes down on South Carolina's statehouse grounds]

South Carolina Gov. Nikki Haley (R) has been widely praised for leading the charge to take down the flag, even after she balked at doing so last year. After the murders, Haley declared: “It’s time to move the flag from the capitol grounds. ... We are not going to allow this symbol to divide us any longer. The fact that people are choosing to use it as a sign of hate is something we cannot stand.”

[Nikki Haley went from tea party star to a leader of the New South]

State lawmakers quickly followed her lead, delivering impassioned speeches about the need to acknowledge that it is a divisive symbol and voting overwhelmingly this week — Democrat and Republicans, white and black — to take down the flag and send it to a museum. On Thursday, Haley turned the bill-signing into another dramatic event, using nine pens representing the nine people killed in Charleston to sign the measure into law.

The way in which South Carolina officials — as well as those in other Southern states — so quickly and smoothly shifted direction and dispatched the flag and other symbols of the Confederacy felt a little like political theater — or, as New York Times columnist Charles Blow described it Friday on CNN, an “opera.”

The South Carolina ceremony was national news, covered live by cable television outlets and streamed on major news Web sites. At one point, as the flag inched down the pole, the crowd broke out singing the 1969 song “Na Na Hey Hey Kiss Him Goodbye.” It was jarring — like microphone feedback. If this moment was about confronting the scourge of racism, particularly the violence it wrought in Charleston, was a taunting sports-arena anthem an appropriate soundtrack?

By contrast, the pomp of the color guard, with its dress uniforms and precision movements in folding up the flag, demonstrated plenty of deference to a banner that officials agreed to take down, in part, because of the hurt and hate that many believe it represents.

The ceremony was clearly designed to acknowledge the sentiments on both sides of the long-running debate. If people left the event feeling that their views had been represented in the ritual of removing the flag, then that's worthwhile. But was the event a bit too celebratory, a premature victory party of sorts?

President Obama and RNC Chairman Reince Priebus seemed to suggest in their statements on Twitter that the removal of the flag was indeed a new beginning — not the end of the long-running struggle for racial harmony and reconciliation.

If nothing else, the odd exit for the Confederate flag in South Carolina showed just how big -- and difficult — such small steps can seem.