The Supreme Court’s ruling Thursday that federal courts cannot determine whether election maps are too partisan has raised the stakes for the 2020 election, leaving room for both parties to draw gerrymandered district lines with little fear of a high court legal challenge.

Critics had hoped that the Supreme Court would deal a blow to the system. But in its 5-4 ruling, the court found that the power to address partisan gerrymandering lies with Congress, not the courts.

“Our conclusion does not condone excessive partisan gerrymandering. Nor does our conclusion condemn complaints about districting to echo into a void,” Chief Justice John Roberts wrote in the majority opinion.

Whichever party controls a state legislature after the 2020 elections will be able to redraw the lines based on data from the 2020 census. With little appetite from Republicans in Congress to impose restrictions on redistricting, gerrymandering will likely continue unless lawmakers who oppose the practice make meaningful gains at the state level next year ahead of the election.

Critics have long argued that the process, known as gerrymandering, disenfranchises minority voters and undermines democratic elections. Lawmakers in Democratic-controlled states like Maryland have also been accused of gerrymandering, but most changes in recent years have benefited Republicans.

After the last census, Republicans gained the upper hand when they swept into power in many state legislatures in the 2010 elections. Since then, GOP-controlled legislatures have redrawn election maps to fill certain districts with more Republican voters, including in North Carolina, Ohio and Wisconsin.

Whichever party controls a state legislature after the 2020 elections will be able to redraw the lines based on data from the 2020 census.

Gerrymandering predates the 2010 election of course. But the issue has increasingly been at the center of state-level fights for political power since then. Of the 435 congressional districts across the U.S. that year, 70 were rated as having a competitive partisan balance, according to FairVote, a nonpartisan group that monitors electoral reform. By 2011, there were 53 competitive districts. (Some researchers point out that other factors, such as self-segregation based on political ideology, could also be contributing to the decline in competitive districts.)

Nearly a decade later, the number of truly competitive House seats has arguably decreased to a few dozen. Opponents of the practice often point to oddly shaped districts that have been given nicknames such as the “praying mantis” and the “upside-down elephant” to show the lengths to which many state legislatures will go to exclude certain voters and create favorable House seats for their party.

The Supreme Court’s ruling “is a huge decision” in a country with a long history of political gerrymandering, Julian Zelizer, a political historian at Princeton University who has studied this issue, wrote in an email.

One-party rule in many states “will be uncontrolled,” Zelizer added. The ruling is a major “step back for those trying to guarantee that each vote counts equally.”

Immediate impact and the battle for control in 2020

The Supreme Court’s ruling will have an immediate impact. States such as North Carolina, Maryland, Ohio and Michigan whose election maps were being challenged in federal courts, will not be forced to change their maps as lower courts had ordered.

The next battle will be the 2020 General Election.

“State legislative races are more important than ever,” said Justin Levitt, an election law professor at Loyola Law School Los Angeles, who wrote an amicus brief in the Supreme Court case in opposition of partisan redistricting.

“Whoever wins the 2020 elections on the state level will be in control of both state and federal districting for the next decade,” he said.

Left-leaning groups already had plans in place to take on gerrymandering before the court’s decision. The National Democratic Redistricting Committee, a group headed by former U.S. Attorney General Eric Holder that focuses on making districts more competitive for Democrats, is targeting states where the party can pick up key seats.

The group is also pushing for reform in state courts, where lawsuits against partisan redistricting can still be argued on the basis of state laws despite the Supreme Court ruling, which only bars federal courts from weighing in on the issue.

The Pennsylvania Supreme Court, for example, ruled last year that the state’s districting map violated the state’s constitution. That case could serve as a model for activists hoping to throw out maps in other states.

The National Republican Redistricting Trust, the Republican counterpart to Holder’s group, said it is ready to oppose Democratic efforts at the state level, including any moves to add more liberal judges to the state supreme courts that would ultimately decide redistricting cases.

Who draws the lines?

At the federal level, Congress could pass a law that regulates federal election districts, but such measures have failed to gain bipartisan support.

A measure the House of Representatives passed this year would force states to create independent election commissions that use nonpartisan means to draw House districts. Democrats, who sponsored the legislation, said it would “expand Americans’ access to the ballot box, reduce the influence of big money in politics, and strengthen ethics rules for public servants.” The Republican-controlled Senate has not voted on the bill.

In 31 states, state legislatures draw the congressional districts themselves.

Currently, independent commissions in nine states — Arizona, California, Colorado, Hawaii, Idaho, Michigan, Montana, New Jersey and Washington — are responsible for drawing congressional district lines, according to the National Conference of State Legislatures.

Some other states have advisory commissions that recommend how the maps should be drawn, while leaving the final say in the hands of the state legislatures. In 31 states, state legislatures draw the congressional districts themselves.

It can be difficult to measure the effectiveness of independent commissions because demographics and other political factors shift from one election to the next. But available data indicates those commissions have made districts more competitive, The New York Times reported. There has also been fierce partisan debates within commissions themselves.

Partisanship and racial discrimination

Under the Voting Rights Act, districting maps cannot be drawn so that they discriminate against voters based on race.

The high court’s ruling does not change that, but minority advocates said they feared that by declining to block partisan gerrymandering, the Supreme Court handed lawmakers a roadmap to legally discriminate against non-white voters.

State lawmakers “can simply substitute their true intent of [discrimination based on] race [with] partisanship and achieve the same outcome of minimizing the impact of the African American vote,” NAACP President Derrick Johnson said in an interview.

Conservatives who oppose changes to the redistricting laws said those fears were overblown.

“Legislators, both Democrat and Republican, have for years claimed that the racial gerrymandering they engaged in was for partisan purposes and not racial, and the courts have seen through that,” said Hans von Spakovsky, a senior legal fellow at the consertative think-tank the Heritage Foundation.

Deciphering whether legislators used party or race to draw election maps can be more difficult in certain parts of the country. Minority voters in southern states, for example, tend to vote as a bloc for Democrats, which means when districts are drawn based on party affiliation they are also largely drawn based on race.

The Southern Coalition for Social Justice points to North Carolina, where the nonprofit is headquartered, as an example. Their analysis shows that voting patterns often overlap with race. In one area, which encompasses the historically black college, NC AT&T State University, lawmakers redrew the lines to split the campus into two districts.

A map of the district shows minority voters are split into the two new districts, but state lawmakers have claimed they drew the maps for political reasons. The case is set to be heard in state court next month.

And while advances in technology and data collection can help parse out which voters are most affected by gerrymandering, it can also exacerbate the problem.

Margo Anderson, a Census expert from the University of Wisconsin-Madison, said gerrymandering and redistricting may grow increasingly problematic as technology is used to manipulate maps and data from the census..

“Gerrymandering as we know it today was hard to do until recently because the detailed geographic data and electronic mapping tools used today didn’t exist” in the past, Anderson wrote in an email. “As census methods improved, and more data was published, the redistricting process gets more sophisticated.”