COLUMBIA, S.C. - South Carolinians awoke Thursday to learn that their legislature had voted in the dead hours of the morning to do what was once considered unthinkable: remove the Confederate battle flag.

Around the flag on the State House grounds a few hours later, there was a buzz of conflicting emotions. Anti-flag protesters were there, as they had been in recent days, but now their signs, instead of calling for removal, shouted messages of relief.

“IT IS A BEAUTIFUL DAY IN SC,” one sign read - an echo of the happy-talk catch phrase that Gov. Nikki R. Haley insists state workers use when they answer the phone.

Not everyone, though, was happy. Michael French, 43, a contractor who lives outside Columbia, came with his son Chandler, 17, to take a picture of the flag before it came down.

“Biblically speaking, anytime there’s something that causes division among men, it should be done away with,” said French, who is white. “But I don’t think that applies here, because there will always be something else” - that is, something else for protesters to protest about.

Next, “they’re going to want to take down the Confederate monument,” his son predicted. “Everybody wants to be a victim.”

Still, here in an area of the city rich with Southern memorabilia and moodiness, from blooming pink flowers to the towering Confederate monument topped with an armed soldier, visitors of all kinds - black and white, pro- and anti-flag - seemed compelled to gather and reflect in relative peace.

As drivers passing by honked in support or shouted obscenities, some people waved small American flags. Many snapped selfies near the Confederate flag, which will come down within 24 hours of Haley’s signing the bill that the legislature approved - which her office said would happen at 4 p.m. Thursday.

An older white man with a cane posed by the flagpole, solemnly, as another man took his photo. Both declined to comment.

Tamela Stevenson, 49, a stay-at-home mother who is black, posed with her children, too, wearing a big smile. She said her grandmother Annie Mae Robinson had always told her that the flag would never come down in Robinson’s lifetime. She was right: She died 23 years ago.

“This just marks the beginning of South Carolina going forward and being with the rest of the world,” Stevenson said. “I know it won’t change everything, like the way people feel. But going forward, in the future, I think it will help.”

On Main Street - which runs through a reviving downtown and dead-ends at the capitol, by the Confederate memorial where the flag hangs - the mood tilted toward jubilation.

“It’s coming down!” a homeless black man, Louis Richardson, shouted to no one in particular, his belongings in a couple of grocery bags slung over his shoulder.

Richardson, 56, said the flag weighed heavily on the hearts of black people here as a symbol of “slavery and oppression.”

“It’s a new generation now,” he said, referring to younger people of all races. “They want change.”

Main Street itself is a 19th-century relic in a place that, in many ways, has its eyes set on the 21st.

The sidewalks were recently refinished, a bourbon bar and hip coffee shop have opened, and a series of informational signs have been erected to commemorate the civil rights gains of the 1960s.

Raymond Bailey, 64, an African-American who works for a moving company, was reading one such plaque Thursday morning. It commemorated the 1951 civil rights case Briggs v. Elliott, which helped pave the way for the Supreme Court’s 1954 ruling in Brown v. Board of Education.

The flag down the street was, unsurprisingly, on his mind.

“From my knowledge, it don’t represent anything good,” Bailey said. He said he understood that for some whites, it represented “respect for their ancestors and all that.”

But he also spoke of the racism he had experienced in his life in South Carolina: being forced to sit in the balconies of segregated movie theaters, or working as a teenager in a bowling alley here, resetting pins and having to jump out of the way as malicious whites hurled bowling balls at him.

The flag’s coming down, he said, “is a good thing, from what I’ve seen and experienced in life.”

The heated debate in the House overnight prompted a public uproar far beyond this stretch of road, both for and against the flag. Lawmakers voted hours after the chief of the South Carolina Law Enforcement Division said the authorities were investigating a round of threats against members of the legislature.

“We recognize the First Amendment protections offered for free speech,” the chief, Mark A. Keel, said in a statement. “That’s not what this is about. Legislators on both sides of the issue have received communications that include death threats. That’s not free speech; it’s illegal to threaten to kill or injure a public official or their immediate family.”

But at least initially, given the unusual hour of the House’s vote, reaction was muted among the flag’s strongest official supporters.

The South Carolina chapter of the Sons of Confederate Veterans, the heritage group that repeatedly urged its members to call lawmakers and Haley to register their opposition to removing the flag, said little quickly.

On its website, the group described Thursday as “a truly sad day in Dixie” and posted a document that showed how House members had voted just after 1 a.m.

And Haley, whose only immediate comments after the vote came in a one-paragraph statement, was under persistent attack online. On her Facebook page, one commenter described her as “a disgrace to the South and its heritage,” while another said she had participated in “a betrayal to the history of our state.” Some comments were even more caustic.

But the governor was also receiving wide praise, both on her social media platforms and from lawmakers, and as Thursday edged forward, Democrats and Republicans tried to cheer one another.

“We are battered, bruised and still heartbroken, yet tonight, due to herculean bipartisan actions of Democrats and Republicans, we were able to accomplish something that many believe to be impossible,” Jaime Harrison, the chairman of the South Carolina Democratic Party, said in a statement. “Tonight, my friends, our unity has birthed renewed hope.”

The chairman of the state Republican Party, Matt Moore, concurred, writing on Twitter: “Don’t let anyone tell you different: S.C. is filled with many good, honest people who want what’s right. It was proven again tonight.”