Recent court decisions in three states are putting carefully carved Republican-drawn state legislative districts at risk — and could even threaten the entire process of partisan map drawing.

On Friday, a federal court ordered Wisconsin legislatures to redraw their state House legislative districts after finding in November that the districts were unconstitutionally partisan. The order will essentially require lawmakers to redraw state Senate maps as well.

The November decision was the first time this decade that a court has thrown out legislative maps because they favored voters of one party over another. Subsequently, this will be the first time in a decade that lawmakers will have to redraw maps specifically to make them more fair for both parties.

Thirty-seven states allow their legislatures to draw their electoral maps, and what these lawmakers have come up with has had a profound effect on U.S. politics. After capturing 21 chambers in the 2010 elections, Republicans redrew nearly half of all congressional districts — four times as many as Democrats.

Over the ensuing years, control of state legislative chambers flipped from 2-to-1 Democratic-controlled to 2-to-1 Republican-controlled, and Democrats have been locked out of the majority in key swing states ever since. In many states, their only hope to make it back to the table to redraw maps after the 2020 census is by winning competitive governor's races.

Wisconsin Democrats, who are in the minority in the legislature, were hoping the court would redraw the maps itself, but having a second shot at these maps is better than nothing.

As such, they are demanding public hearings on the map-drawing process to try to keep a check on it.

“What we cannot and will not tolerate is another map drawn behind closed doors,” Wisconsin Assembly Democratic Leader Peter Barca said in a statement.

Wisconsin is one of the most gerrymandered states in the nation. In 2012, Democratic candidates for the Wisconsin state legislature received more votes than Republicans in November but won just 39 of 99 districts.

Republicans plan to appeal the decision to the U.S. Supreme Court, and it's anyone's guess how the justices will decide, said Doug Johnson, a redistricting expert at Claremont McKenna College. He said justices have shied away from declaring partisanship because they haven't agreed on a way to specifically measure what constitutes disproportionately burdening one member of a party over another.

In Maryland, a federal court is preparing to hear arguments that several congressional districts were drawn by Democrats to unfairly benefit their party.

“There's certainly a lot rolling toward the Supreme Court,” he said. “We just have no idea whether the court will get on board or continue to avoid this question.”

The news Wisconsin lawmakers will have to redraw their state legislative maps comes almost exactly a week after a federal court found a dozen state legislative districts in Alabama were unconstitutionally racially gerrymandered. (The Democratic judge on that panel wrote that he would have thrown out 24 districts.) All 12 of the districts thrown out were represented by Democrats, and 10 by African American legislators.

This court also left it up to the state legislature to redraw the districts, but because there are so many in question, the order would likely require lawmakers to redraw all state House and Senate districts. Here too, Democrats are thankful for a second chance.

“We’re thankful for the opportunity to look at this,” Alabama Senate Minority Leader Quinton Ross (D) told the Montgomery Adviser.

North Carolina is no stranger to legal jousting over gerrymandering; lawmakers had to redraw two congressional districts last year after a federal court found them racially gerrymandered.

This time, they're awaiting a decision from the Supreme Court about whether to redraw and hold special elections this spring for 28 of its state legislative districts, which a federal court found last summer were unconstitutionally gerrymandered, again because of race.

The three-judge panel made the unusual decision to let the election go forward because it decided it was too late to redraw the maps. After the election, the court ordered the legislature to redraw the lines by March and hold special elections later in 2017.

Republican legislative leaders successfully managed to get the Supreme Court to pause those elections until it decides whether the districts were indeed gerrymandered.

Over the past few years, courts have been litigating a steady stream of gerrymandering claims. But as the 2020 census nears — and brings with it a new chance to draw district maps — their decisions will be more closely watched than ever.