COLUMBIA, South Carolina — South Carolina Gov. Nikki Haley signed legislation Thursday to permanently remove the Confederate battle flag from the state capitol grounds, following an emotional debate spurred by the massacre of nine black churchgoers last month.

Haley signed the bill into law in the State House Rotunda before an audience of legislators and dignitaries shortly after 4 p.m. EDT, and her office said the flag would be taken down at 10 a.m. Friday.

The flag will go to the “relic room” of a military museum in Columbia, the state capital.

The rebel banner, carried by Confederate troops in the 1861-1865 Civil War, is seen as a symbol of racism and slavery by many, while others proudly hail it as an emblem of Southern heritage. It has flown at the state capitol for 54 years.

South Carolina was planning to keep the flag relocation “as low-key as the national media will let us,” Haley spokeswoman Chaney Adams said.

In Washington, Republican leaders in the U.S. House of Representatives abruptly canceled a vote on a measure to allow the flag to be flown in cemeteries operated by the National Park Service, after an outcry by opponents.

White House spokesman Josh Earnest described the bipartisan flag vote in South Carolina as a sign of “progress.”

He added, “Republicans in Congress, however, seem to have values and priorities that lie elsewhere,” reference to the park service bill.

The flag, carried by Confederate troops in the 1861-1865 Civil War, is seen as a symbol of racism and slavery by many, while others proudly hail it as an emblem of Southern heritage. It has flown at the state capitol for 54 years.

A small crowd gathered Thursday on the State House lawn waving “Take Down the Flag” signs as drivers honked their horns.

Others snapped photographs on the last full day the banner will fly from its pole at a memorial to Confederate war dead.

“I love this,” Hammie Johnson said. “It’s about time people came to the realization of what that flag represents to us as African-Americans, and that’s slavery.”

He and his wife, Esther, watched the South Carolina House of Representatives debate the bill on television until the wee hours of the morning.

“We watched all of it, every last bit,” he said.

Jim Felder, 76, one of the first blacks to be elected to state House, said he never thought he would live to see the flag come down.

“I’m so proud today. … I thought maybe my grandchildren would get it down,” he said.

He and others credited Haley with lobbying Republican representatives on Wednesday to pass the bill. “She was just trying to hold them together, like herding cats,” he said, adding that he had new respect for the governor.

The House overwhelmingly approved the legislation after 1 a.m. EDT Thursday. The Senate passed it earlier in the week, also by a huge margin.

In a statement, Haley said, “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 NAACP welcomed the move, calling the flag “one of the longest standing symbols of hatred and exclusion.”

NAACP President Cornell William Brooks in a statement applauded Haley “for her leadership and moral courage by changing her position and supporting the flag removal” after the June 17 slayings at a landmark Charleston church with a predominantly black congregation. A white man, Dylann Roof, is accused in the murders.

The 124-member House approved the bill 94-20 after 13 hours of sometimes rancorous debate and stiff opposition from some conservative white Republicans.

Opponents in the Republican-dominated chamber launched 60 amendments seeking to soften the impact of the flag’s removal, such as hoisting a different Civil War-era battle flag.

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 Democratic Rep. Cezar McNight, who is black.

Republican Rep. Jenny Anderson Horne, who is white, turned her frustration on fellow party members. She invoked the memory of the nine victims, including their pastor, Rev. Clementa Pinckney, a widely admired state senator.

“If you cannot be moved by the suffering of the people of Charleston, you don’t have a heart,” she said, breaking down in tears.

As amendment after amendment failed, flag defenders grew exasperated, accusing opponents of lacking respect for their Southern heritage.

Republican Rep. Chris Corley, who is white, proposed substituting a white flag for the banner, accusing his party of surrendering to media pressure.