Gov. Nikki Haley of South Carolina acted in the interest of her state and the nation on Monday when she called on the Legislature to remove the Confederate battle flag from the State Capitol grounds, after a white man charged with killing nine African-Americans was seen waving the flag in photographs.

Ms. Haley avoided the long-running controversy over the flag in the days after the massacre at the Emanuel African Methodist Episcopal Church in Charleston. But on Monday, in acknowledging that this horrendous act of violence required a new response, she said, “The State House is different, and the events of this past week call upon us to look at this in a different way.”

Mayor Joseph P. Riley Jr. of Charleston, a voice of sanity throughout this tragedy, framed the matter in exactly the right way when he said that, even though the battle flag symbolized “Southern pride” to some people, it had a much more sinister meaning to others. “When it is so often used as a symbol of hate,” he said, “of defiance to civil rights, to equal rights, equality among the races, a symbol used by the Klan, a symbol you saw at every protest event during times of integration and racial progress, then, in front of the State Capitol, for those who harbor any of those kinds of feelings — and we hope they are very few — it nonetheless sends the wrong kind of message.”

Those who have defended keeping the Confederate flag flying at the Capitol have often described it as merely a commemoration to the Civil War dead. But as the writer K. Michael Prince documents in “Rally ’Round the Flag, Boys!,” flags were not used in this way at the Confederate memorial on the Capitol grounds in the late 19th or early 20th centuries. Only in later decades was the flag introduced — and steadily elevated in importance — to bolster the idea of white supremacy at moments when South Carolina’s Jim Crow-era government came under federal pressure to allow black citizens even nominal civil rights.