Republican state Sens. Dan Soucek, left, and Brent Jackson, right, review historical maps during The Senate Redistricting Committee for the 2016 Extra Session in the Legislative Office Building at the North Carolina General Assembly, in Raleigh

If Republican strategist Karl Rove was right when he predicted in 2010 that “he who controls redistricting can control Congress,” then the Pennsylvania Supreme Court’s newly drawn congressional district map spells very bad news for the GOP.

It’s not just that the new map, which Republicans fought tooth and nail and continue to challenge in court, gives Democrats a shot at winning up to six additional seats in the 2018 midterms. The problem for Republicans is that their failure to block the Pennsylvania map may signal a turning point in the redistricting wars, and in the GOP’s eight-year campaign to manipulate district lines to keep their seats.

The Pennsylvania Supreme Court’s decision to throw out the previous GOP-drawn district map was just the latest in a string of court rulings around the country that rejected Republican maps as unlawfully gerrymandered along partisan lines. In January, a federal court in North Carolina struck a Republican map as a partisan gerrymander. A Wisconsin federal court’s rejection of a GOP-drawn map as too partisan is now pending before the Supreme Court, which has also taken up a challenge to a map drawn by Democrats in Maryland, and is expected to decide both cases in June.

The Pennsylvania case also offers something of a road map for opponents of partisan gerrymandering by demonstrating that state courts may prove receptive to legal challenges, says Michael Li, senior counsel for the Democracy Program at the Brennan Center for Justice. Until now, democracy advocates pushing for fair maps have focused principally on federal courts. But many state constitutions, like Pennsylvania’s, implicitly outlaw partisan gerrymandering by declaring that elections “shall be free and equal.”

“What Pennsylvania shows is that there may be a second front in the war on partisan gerrymandering, and that’s the state courts and the state constitutions,” says Li.

Not that Republicans are about to cede control of district maps without a fight. The Pennsylvania saga demonstrates just how low Republicans will stoop to retain their grip on redistricting. GOP leaders in the state legislature sought to disqualify one state Supreme Court judge as biased, and refused a court order to hand over data the justices said they needed to draw a map. One GOP House member has launched an effort to impeach the court’s Democratic justices. State Republicans also asked the U.S. Supreme Court to intervene, but conservative Justice Samuel A. Alito denied the request without even referring the matter to the full court.

That hasn’t stopped Pennsylvania Republicans from going back to court, and they’ve now been joined by the national GOP, and egged on by President Trump, who tweeted that Republicans should fight the map “all the way to the Supreme Court, if necessary.” Never mind that the Supreme Court has already heard the Republicans’ argument—that the Constitution gives the legislature alone the power to draw district lines—and found it wanting. The Republicans’ pledge to seek redress in the federal courts is something of a legal “hail Mary,” says Li, because the Supreme Court has ruled that federal courts do not have jurisdiction over state court decisions.

The Trump administration has also set out to manipulate the redistricting process on a grand scale, by laying the groundwork for maps that count only U.S. citizens, not population as a whole, in drawing district lines. In the 2016 constitutional challengeEvenwel v. Abbot, Republicans argued that district maps should only include eligible voters, but the Supreme Court rejected the challenge.

Now the Justice Department has asked the Census Bureau to include a question on the 2020 Census that asks respondents to say whether they are U.S. citizens. Civil and voting rights advocates warn that such a question could frighten many immigrants (especially in households with both legal and undocumented immigrants) away from filling out the form at all, and lead to drastic undercounts.

Since congressional apportionment is based on population, the upshot could be fewer seats in urban (and typically Democratic) areas. None other than Kris Kobach, the Kansas Secretary of State who made such a mess of Trump’s now-defunct election “integrity” commission, shed light on Republicans’ true motivation in a recent Breitbart commentary.

“Right now, congressional districts are drawn up simply based on the number of warm bodies in each district,” Kobach wrote. “Not only are legal aliens counted, but illegal aliens are counted too. As a result, citizens in a district with lots of illegal aliens have more voting power than citizens in districts with few illegal aliens.”

It remains to be seen how such efforts will hold up in court, but either way voters are losing patience. Ballot initiatives and legislation to inject fairness into the redistricting process are gaining momentum around the nation. In May, Ohio voters will decide on a ballot measure aimed at creating a more transparent, bipartisan map-drawing system. Michigan activists are also collecting signatures for a ballot measure that would create an independent redistricting commission.

In Pennsylvania, a bipartisan House bill to create an independent commission to draw district maps has drawn 109 cosponsors, a third of them Republicans. Republican state House member Daryl Metcalfe has said publicly that he can “guarantee” that the matter will never move out of the State Government Committee, which has jurisdiction over the matter, and which he chairs. But the more Republicans fight to retain control over redistricting, the more clear it becomes how much they stand to lose once the rules are no longer rigged in their favor.