The controversial Confederate flag will soon be gone from the grounds of South Carolina's state house after lawmakers voted to remove it, in a stunning reversal prompted by a mass shooting at a black church.
In a pre-dawn vote on Thursday (local time) capping hours of tense legislative debate, the state's House of Representatives agreed overwhelmingly to remove the Civil War-era battle flag.
The measure was passed by a vote of 94-20 - well beyond the two-thirds majority needed for final approval. The same bill had already cleared the Senate, sending the legislation to Governor Nikki Haley for her signature.
The Republican governor has called for the flag to come down after the June 17 killings of nine black worshippers during an evening Bible study class at the Emanuel African Methodist Episcopal Church in Charleston.
Dylann Roof, the 21-year-old man charged in the killings, had been photographed before the attack with the Confederate flag, which for many is seen as a symbol of hate and racism rather than regional heritage.
"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," Haley wrote after the vote.
She was expected to sign the bill into law at 4pm Thursday (local time). She then has 24 hours to take down the flag, which will be moved to a nearby museum.
Haley praised lawmakers for voting to remove the divisive banner - a move that just a month ago would have been nearly unthinkable in the state known as the birthplace of the Confederacy.
The vote in the South Carolina House came after more than 13 hours of heated debate, with opponents of the flag defeating a raft of amendments intended to slow down passage of the measure.
Following last month's shooting, the Confederate flag has already come down outside the Alabama state legislature, and several major retailers across the United States have said they will no longer sell flag-related merchandise.
"It's been a long time coming but I always felt this day would come," tweeted James Clyburn, a longtime member of the US House from South Carolina, who is African American.
Members of the white supremacist Ku Klux Klan are nevertheless planning a pro-flag rally in the state capital Columbia on July 18.