Republicans are twisting themselves into knots trying to blame the fallout from HB2 on Democrats. Now that the law is about to be repealed they’re blaming—gasp—politics. Who’d a thunk it?

Of course it was politics. The bill was a political scheme designed to motivate the GOP base while giving some goodies to the business community, who, it turned out, didn’t really want them. It ended up being a lightning rod that shifted from a social issue to an economic one and cost the GOP the Governor’s Mansion and attorney general’s office.

Republicans are screaming loudly that Roy Cooper and his team scuttled the same deal in May that’s being made now. That may have a bit of truth in it, but the political situation was completely different. In May, the LGBT community believed that they might be able to get repeal while keeping the clause in the Charlotte ordinance that allowed transgender people to use the bathroom of their choice. The GOP, though, dug in and made it clear that they were willing suffer economic hardship and national ridicule to keep the bill intact.

By September, HB2 was causing serious political damage to Pat McCrory. We had lost the NBA All-Star game and ACC tournament games, not to mention dozens of other conferences and entertainers. The governor had made himself the face of the law, running ads arguing that it protected women and children from sexual predators. That argument was BS of course, but that was his story and he was sticking to it.

So when the GOP tried to cut the same deal in May (Charlotte repeals their ordinance and the General Assembly repeals HB2), they were in the final weeks of the campaign. Why in the world would any Democrat make a deal that would help Republicans six weeks before an election? At that point, Republicans knew HB2 was a loser for them and Democrats just wanted the scenario to play out.

Post-election, the political damage to the GOP from HB2 was obvious. The courts had ordered new legislative elections in 2017 and McCrory was no longer in place to absorb the blows. Democrats, for their part, want a fresh start without continuing economic damage from the law . The LGBT community knows that the GOP is not going to repeal HB2 without getting rid of the bathroom clause in the Charlotte ordinance.

If HB2 is really repealed, the LGBT community and Democrats won this battle in the culture wars. Local governments will once again have the power to enact anti-discrimination policies that protect people based on their sexual orientation. Transgender people will be able to use the bathroom of their choice regardless of whether language is in the ordinance or not, in part, because they spurred a national conversation about what transgender means. It was a huge educational moment. Democrats, the party that advocates most strongly for equality, took control of the Governor’s Mansion in North Carolina and kept the attorney general’s office, also big wins for minorities that need protecting.

Make no mistake. HB2 was a completely self-inflicted wound. Republicans passed a broad, far-reaching bill that affected every county and city in North Carolina to address a single clause in local ordinance that affected one city in the state. They also threw in measures to appeal to the business community by banning local governments from raising the minimum wage. They did it to fire up their base in an election year and found out that many in the business community care about more than just profits. In the end, they paid a political price for overreach and cost the state millions of dollars in revenue. Repealing the law will stop the hemorrhaging. If the deal falls through, Democrats will bludgeon Republicans with the negative impact of the law in the elections this year.