Nearly a decade ago, Republicans swept into office in state legislatures and in the House of Representatives, and went about remaking American politics — despite a Democrat in the White House. Almost immediately after the GOP captured several pivotal state governments in 2010, they began a frenzy of gerrymandering that seemed to guarantee Republican majorities for the rest of the decade.

But as we approach the 2020 elections, it appears that cracks are finally showing in the GOP’s gerrymandering wall.

Last week, for example, a panel of three North Carolina judges struck down state legislative maps that, in the words of that court, were “carefully crafted” to ensure that “in all but the most unusual election scenarios, the Republican party will control a majority of both chambers of the General Assembly.”

Under the gerrymandered maps, Republican state Senate candidates “won a minority— 49.5%—of the two-party statewide vote, but still won 29 of 50 seats (58%).” GOP state House candidates “won a minority—48.8%— of the two-party statewide vote, but still won 65 of 120 seats (54%).”

The panel was, in its own words, made up of judges with “differing ideological and political outlooks.” Yet all three agreed that the maps must fall. The state legislature has until September 18 to “enact Remedial Maps for the House and Senate legislative districts for the 2020 election ... in conformity with this Order.” Republicans do not plan to appeal the decision in the case, Common Cause v. Lewis, so the 2020 election will likely be the first in nearly a decade where Democrats have a fighting chance to take control of the state legislature in North Carolina.

Common Cause is just the latest in a series of court decisions and ballot initiatives that either undercut Republican gerrymanders or that seek to prevent either party from drawing similarly gerrymandered maps in the future. Court decisions in Florida, Pennsylvania, and Virginia have weakened Republican gerrymanders, while ballot initiatives in Michigan and Ohio seek to prevent either party from gerrymandering those states ever again.

To be clear, Republicans still benefit from many of the gerrymandered maps they drew nearly a decade ago. The Wisconsin State Assembly, for example, is so thoroughly gerrymandered that Republicans control 63 percent of the seats, despite the fact that Democrats won 54 percent of the popular vote in the most recent election. Similarly, Republicans won 23 of Texas’s 36 US House seats in 2018, even though GOP Sen. Ted Cruz won a narrow victory with less than 51 percent of the vote.

But in numerous key states, Republican gerrymanders are either gone or on the cusp of collapse. Republicans still enjoy structural advantages in many states, but the crushing national dominance they enjoyed in 2012 is no more.

How Republicans dominated redistricting

Under the doctrine of one person, one vote, legislative districts within a state must be roughly equal in population. Accordingly, states must redraw their districts every 10 years to account for the new population data provided by the decennial census.

This means that the party that controls the state government during this redistricting process potentially has the power to lock itself into power through gerrymandering.

2010, the last election year before a redistricting cycle, was a baller year for Republicans. Buoyed by a weak economy that dragged down incumbent Democrats, Republicans gained control of several large swing states. They then used that control to enact aggressive gerrymanders that all-but-ensured Republican dominance in state legislative and congressional elections.

The project was known as “REDMAP,” and it was a smashing success for the GOP. “Republicans enjoy a 33-seat margin in the U.S. House seated yesterday in the 113th Congress,” the Republican State Leadership Committee bragged in a memo a couple months after the 2012 elections, despite “Democratic successes atop the ticket and over one million more votes cast for Democratic House candidates than Republicans.”

Now, however, many of these gerrymanders lie in shambles. Some were watered down by court decisions, while others are endangered by new anti-gerrymandering laws.

In case there’s any doubt, Democrats were far from innocent while Republicans ran their REDMAP playbook. In Maryland, for example, the Democratic government enacted a gerrymander that, in the words of then-Gov. Martin O’Malley (D), was designed to “use the redistricting process to change the overall composition of Maryland’s congressional delegation to 7 Democrats and 1 Republican.” Even now, however, Republicans control enough solidly red states to counterbalance — and most likely outweigh — Democratic gerrymanders.

But gerrymandering is most potent, at least at the congressional level, in large swing states. Smaller states have too few districts for gerrymandering to impact more than one or two seats. Meanwhile, states that strongly favor one party are already likely to produce such lopsided congressional delegations that there’s only so much that can be accomplished through gerrymandering.

Republican congressional gerrymanders, in other words, did a great deal of their work in six swing states that President Obama won in 2012, but that also produced heavily Republican congressional delegations in the same year.

Of these six states, Florida and Pennsylvania’s congressional gerrymanders were weakened — or rolled back entirely — by courts. Michigan and Ohio now have laws that will make it much more difficult for either party to re-gerrymander those states after the 2020 census. And in Virginia, Democrats now dominate the state’s congressional delegation after the party’s strong performance in the 2018 midterms. If Virginia Democrats perform well in this November’s state legislative races, they could shape the state’s legislative maps for the next decade — and that’s assuming that Virginia doesn’t pass an anti-gerrymandering amendment that may appear on the 2020 ballot.

Only Wisconsin, the sixth of these swing states where Republicans dominated legislative elections even as Obama won the state as a whole, stands out as a bastion of Republican gerrymandering — and even that may soon change. In 2018, the state elected Tony Evers, a Democrat, as its governor. That gives Evers the power to veto legislation seeking to maintain the GOP’s gerrymanders in the next redistricting cycle (although there are whispers that Wisconsin Republicans are looking for a way to bypass Evers and enact new maps without his signature).

The point is not that the last round of Republican gerrymanders is completely dead. In some states, state legislative maps still favor Republicans. In others, the GOP’s congressional gerrymanders remain intact even as the state legislative maps have changed. Florida could backslide, in large part because all seven seats on the state Supreme Court are held by GOP appointees.

But the gerrymandering wall now has a lot more holes.

Will the Supreme Court allow this to continue?

Looming over all of this is the Supreme Court’s 2015 decision in Arizona State Legislature v. Arizona Independent Redistricting Commission, a challenge to an Arizona constitutional amendment that took the power to draw legislative districts away from the state legislature, and gave it to an independent commission. Significantly — and I’ll get to why in a minute — this amendment was enacted through a ballot initiative.

The Constitution provides that “the Times, Places and Manner of holding Elections for Senators and Representatives, shall be prescribed in each State by the Legislature thereof.” For more than a century, however, the Supreme Court’s read the word “Legislature” broadly. In the words of one 18th-century dictionary, the “legislature” is “the power that makes laws.” Thus, if a state permits the people to make laws directly through a ballot initiative, the Constitution permits ballot initiatives to be used to write election laws.

Nevertheless, the plaintiffs in Arizona State Legislature claimed that the word “Legislature” must be read narrowly, to include only “the representative body which makes the laws of the people.” Under this theory, Arizona’s redistricting commission is invalid because it bypasses the state’s representative body and gives someone else the power to draw congressional districts.

The Supreme Court rejected the plaintiffs’ theory, reaffirming many years of precedent that read the word “Legislature” broadly — but it did so in a narrow 5-4 vote. Conservative Justice Anthony Kennedy, who retired in 2018, crossed over to join his liberal colleagues in the majority.

With Kennedy gone, and the much more conservative Justice Brett Kavanaugh occupying Kennedy’s seat, there may now be five votes to overrule Arizona State Legislature and undercut efforts to fight gerrymandering through ballot initiatives. Indeed, a decision reading the word “legislature” narrowly could have sweeping implications for the redistricting wars.

In 2018, after their state Supreme Court declared partisan gerrymandering unconstitutional, Pennsylvania Republicans argued that the state courts could not do so because congressional districts may only be drawn by a “legislature,” and a court is not a legislature. This argument, however, has not fared well, even before some of the Supreme Court of the United States’ most conservative members.

There’s also another reason to believe, moreover, that at least some of the dissenters in Arizona State Legislature won’t try to revisit that decision.

Last June, the Supreme Court decided Rucho v. Common Cause, a crushing defeat for opponents of partisan gerrymandering. The holding of Rucho is that federal courts may not intervene to prevent partisan gerrymandering (although they may step in to prevent states from drawing racial gerrymanders).

Yet, while Rucho was a loss for democracy, the decision had a silver lining for advocates fighting gerrymandering outside of federal court. “Numerous other States are restricting partisan considerations in districting through legislation,” Chief Justice John Roberts wrote in a section of Rucho explaining why he believes that federal courts do not need to intervene to stop partisan gerrymandering. He continued with what appears to be an explicit endorsement of the very kind of independent commission Roberts voted to strike down in Arizona State Legislature:

One way they are doing so is by placing power to draw electoral districts in the hands of independent commissions. For example, in November 2018, voters in Colorado and Michigan approved constitutional amendments creating multimember commissions that will be responsible in whole or in part for creating and approving district maps for congressional and state legislative districts.

Rucho, in other words, appeared to declare the Supreme Court’s neutrality in the redistricting wars. The Court will not end partisan gerrymandering, but it also appears reluctant to revive creative legal theories that would return the power to draw legislative maps to partisan lawmakers.

The question is whether Roberts actually intends to remain neutral. In Arizona State Legislature, he wrote a strongly worded dissent accusing the majority of performing a “magic trick” with the Constitution’s language. The compromise Roberts appeared to offer in Rucho is at odds with Roberts’ dissent in Arizona State Legislature. If the Court’s conservative majority abandons that compromise, REDMAP could ride again.

But if they don’t revisit Arizona State Legislature and decide to stay neutral on the issue, that bodes well for gerrymandering’s critics. Such neutrality will not ensure free and fair elections in every state. But it may be just enough to keep Republicans from rebuilding the wall of gerrymandering they constructed nearly a decade ago.