The South Carolina legislature has passed a bill to remove the Confederate battle flag from the state capitol grounds after a 13-hour debate over the controversial banner.
The flag, which dates back to the 1861-65 American Civil War, is a symbol of slavery and racism for many and southern heritage for others.
The bill, already approved by the state senate, passed a third and final vote in the state House of Representatives in the early hours of the morning by a margin of 94-20 and now goes to Governor Nikki Haley to be signed into law later in the day.
Ms Haley has said she will sign it.
The bill was passed after three days of intense debate in both chambers.
The final vote was secured exactly three weeks after nine black worshippers were shot dead on 17 June 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 posing with a Confederate flag on a website bearing a racist manifesto.