It’s a great day in South Carolina. After more than six decades flying at the statehouse—first atop it, then nearby—the Confederate battle flag will soon come down for the final time in Columbia. The state House of Representatives voted 94-20 on Thursday to remove the flag, following a 36-3 vote in the Senate on Tuesday.

Many people deserve credit for the flag coming down, from the thousands who marched in Charleston to Bree Newsome, who took matters into her own hands. Intense national pressure came from both individual citizens and large corporations who do business in South Carolina. And the removal is a victory for human dignity and historical reality.

Politically, though, this is a victory for Republicans. The turning point in the conversation came when South Carolina’s Republican governor, Nikki Haley, made a statement calling on the legislature to remove the flag without delay. Her decision followed an unequivocal demand from 2012 GOP presidential nominee Mitt Romney, and when Haley announced it, she was flanked by Senator Tim Scott, a black Republican from Charleston. Her call was echoed by GOP Senator Lindsey Graham, who’d been publicly waffling just a few days earlier. Practically speaking, only Republicans could have made the change. They hold a 28-18 edge over Democrats in the Senate and a 78-46 advantage in the House. While every Senate Democrat voted to remove the flag, so did all but three Republicans.

The clamorous voices in favor of keeping the flag were Republicans, too, of course—but in one-party states, the ruling party tends to divide on some issues. Most prominent was Lee Bright, a state senator from Spartanburg who is co-chair of U.S. Senator Ted Cruz’s presidential campaign in the Palmetto State. Bright delivered a bizarre, meandering rant against removing the flag during the debate, but most of his Republican colleagues looked away in embarrassment, then voted for expedient removal. In the House, a contentious amendment requiring the battle flag to be displayed in South Carolina’s Confederate Relic Room was ultimately withdrawn by its author so the vote could proceed.

South Carolina Republicans have long known the flag wasn’t doing them or the state any favors. It was added to the capitol in 1961 on the centennial of the Civil War, and at the height of the civil-rights movements. In recent decades, its presence has scared away national companies and the NCAA. In a February 2015 poll, half of South Carolinians supported the flag, but a roughly equal number admitted they thought it was bad for the state’s reputation. The flag was a third rail as recently as the late 1990s: When Republican Governor David Beasley called for moving it from the statehouse to a flag pole on the capitol grounds, white conservative voters reacted fiercely, helping to defeat him in his 1998 bid for reelection. But in a changing South Carolina, not as many people are willing to rally around the flag, as the lopsided vote in the Senate shows. The question was how to broach the subject.

The awful shooting of nine black worshippers in Charleston—including one of the State Senate’s own, the Reverend Clementa Pinckney—created the circumstances. South Carolina Republicans didn’t allow a crisis to go to waste, and now the flag is coming down. They’re not alone. On June 25, Alabama Governor Robert Bentley abruptly ordered the Confederate battle flag hauled down in Montgomery. (Because the flag was raised in South Carolina by an act of the legislature, Haley couldn’t unilaterally remove it without the assembly voting.) In one of the more surreal moments in recent political history, an unimpeachable conservative Republican governor in the South told a newspaper he decided to remove the Confederate flag to avoid a distraction as he sought to raise taxes.

Elsewhere—such as Mississippi, where the battle flag forms a canton on the state flag—some of the momentum to remove the flag seems to have stalled, though not dissipated. There will be a backlash in South Carolina, from protests to angry messages to threats. Once that dies down, however, Palmetto State Republicans are likely to have shown the rest of the country that the state can move forward, while also removing a powerful wedge issue for Democrats. The Grand Old Party’s first president would no doubt approve.