The Confederate flag, a symbol of racism for many in the United States and of Southern heritage for others, is set to be removed from South Carolina's state Capitol grounds on Thursday after lawmakers sealed its fate in a late-night session.
The bill to remove the flag, which dates back to the 1861-65 American Civil War, would transfer it to the "relic room" at a military museum in the state capital, Columbia, as soon as midday Thursday.
It passed a third and final vote in the House of Representatives shortly after 1 a.m. Thursday by a hefty margin of 94-20, after 13 hours of at times rancorous debate and stiff opposition from a group of conservative white Republicans.
It has already passed the Senate and now goes to Governor Nikki Haley who has said she will sign it into law.
Haley posted a statement on her official Facebook page early Thursday saying: "it is a new day in South Carolina, a day we can all be proud of, a day that truly brings us all together as we continue to heal, as one people and one state."
The final vote was secured almost exactly three weeks after nine black worshippers were gunned down on June 17 during Bible study at a church with an historically black congregation in Charleston.
The battle over the banner was stoked by photos of the accused shooter, Dylann Roof, 21, posing with a Confederate flag on a website bearing a racist manifesto.
The massacre prompted widespread repudiation of the flag by southern U.S. politicians, led by Haley, as well as major retailers and motor racing's NASCAR.
The bill appeared to be in trouble as the debate ran late into the night on Wednesday with Republicans launching 60 amendments seeking to soften the impact of taking down the flag.
Various alternatives were proposed, from a referendum to hoisting a different Civil War-era battle flag to flying the current flag only once a year on Confederate Memorial Day.
As patience wore thin, a string of Democrats, both black and white, and some white Republicans, begged the House not to drag its feet any longer, warning that amending the bill could hold up passage for weeks.
"Are we going to tarry in the foolishness of 150 years ago," said Cezar McNight, a Democrat Representative who is black.
Republican Representative Jenny Anderson Horne, who is white, turned her frustration on fellow party members, invoking the memory of the nine victims at Emanuel African Methodist Episcopal church, including their pastor, Reverend Clementa Pinckney, a widely admired state senator.
"If we amend this bill, we are telling the people of Charleston that we don't care about you," she said breaking down in tears. "We are saying that we do not care that someone used this symbol to slay ... innocent people who were worshipping their God," she said.
Several legislators on both sides said they had received threats by email and phone, leading the South Carolina Law Enforcement Division to announce an investigation.
As amendment after amendment failed, defenders of the flag grew exasperated, accusing opponents of lacking respect for their Southern heritage and blasting fellow Republicans, including Haley, for rushing them into a vote.
Republican Representative Chris Corley, who is white and defended the flag, proposed substituting for the banner a white surrender flag and blasted his own party for failing to support him. "Maybe that will make everybody happy," he said.
House members who supported the flag denied its association with slavery, repeatedly referred to the need to show respect for their ancestors who fought for the state and the Confederacy on the losing side of the Civil War.
"I have wept over this thing. I have bathed this thing in prayer," said Eric Bedingfield, a white Republican flag defender. "You can't erase history."
Most Republicans eventually went along with the bill after a resolution was passed assuring them the flag would be respectfully handled and preserved in the museum.
Flag critics point out the flag was not raised atop the State House until 1961, a century after the Civil War, in what many blacks saw as a deliberate snub to the civil rights movement then gaining momentum.
In 2000, the flag was moved from atop the capitol, albeit to a Confederate memorial only yards from the State House entrance.