For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

Creed’s Seafood and Steaks in King-of-Prussia, Pennsylvania, looks like any other restaurant tucked up against a highway intersection, a place for diners in the Philadelphia exurbs to drive for a chop and a couple of glasses of wine.

The state’s 7th District has been likened to a drawing of Goofy kicking Donald Duck.

But it also happens to be a significant piece of Pennsylvania’s political geography—and part of the reason Republican control of Congress could, despite the GOP’s troubles, be hard for Democrats to break in 2018. The state’s 7th congressional district, whose convoluted shape has been likened to a drawing of Goofy kicking Donald Duck, snakes through a bottleneck as narrow as the restaurant and its parking lot, forming a tiny land bridge that connects pools of mostly Republican voters.

On Monday, Pennsylvania’s appellate Commonwealth Court will begin hearing a now fast-tracked case that could invalidate the 2011 map that created the 7th District and the state’s 17 other congressional districts. The Supreme Court of Pennsylvania has ordered the lower court to issue, by year’s end, a ruling on whether the map is an unconstitutional gerrymander, holding open the possibility that all the state’s districts could be redrawn before the 2018 midterm elections.

While Pennsylvania has roughly equal numbers of Democratic and Republican voters (Donald Trump won here by just 44,000 votes out of more than 6 million cast), for the last six years its congressional delegation has been made up of 13 Republicans and just five Democrats, who mostly represent Pittsburgh and Philadelphia. As Democrats scour the country for the approximately two dozen candidates and winnable districts they’ll need to take back the House, a redrawn congressional map in Pennsylvania could present the party with some prime opportunities to pick up seats.

“If Pennsylvania voters are given a fair map in time for the 2018 election, it could be a game changer,” says Mimi McKenzie, the legal director of Philadelphia’s Public Interest Law Center, which in June filed the lawsuit that led to the court’s decision.

Pennsylvania has long played host to some of the nation’s nastiest battles over gerrymandering and redistricting. As fast-growing Southern and Sun Belt states have gained congressional clout, sluggish population growth has led to Pennsylvania losing seats, forcing significant revisions after every 10-year census.

Pennsylvania’s map of jagged, sprawling, and interlocked districts is among the nation’s worst, voting-rights advocates say.

In 2011, Republican state legislators passed a map that lumped two Democratic incumbents into the same district, where, following a hard-fought primary, a Republican claimed victory. The map also divided Montgomery County, which with 800,000 residents is more than large enough to have its own representative, between five districts. The lakefront industrial city of Erie was split between two now Republican districts, and Reading, a hardscrabble Democratic stronghold in the state’s east, was awkwardly attached to mostly rural Lancaster County. Meanwhile, representatives from the state’s two major cities saw their districts redrawn to include more Democratic voters, reducing the party’s strength in the outlying areas. Several voting-rights organizations have rated the patchwork of jagged, sprawling, and interlocked districts among the worst, if not the worst, partisan gerrymander in the country.

Much of the legal conversation around redistricting has focused on the federal courts, which have issued a series of rulings limiting mapmakers from conducting race-based gerrymanders, either by packing minority voters into a handful of districts to weaken their voices elsewhere, or by cracking them among many districts, diluting their power. But federal courts have been hesitant to create similar protections for voters based on the simple matter of what party they vote for, generally finding themselves unable or unwilling to define a workable standard by which to determine when a gerrymander is unacceptably partisan. The lack of a clear standard has left mapmakers of both parties relatively free to game the process to maximum advantage.

In October, the US Supreme Court heard oral arguments in Gill v. Whitford, the high court’s first case on partisan-based gerrymandering in more than a decade. At issue is a legislative map drafted by Wisconsin Republicans that a lower court found to be an unconstitutional and excessive partisan gerrymander. At the hearing, Justice Anthony Kennedy, the court’s usual swing vote, asked questions that indicated he was troubled by the map.

But the Pennsylvania suit, initiated by the League of Women Voters on behalf of 18 Democratic voters drawn from each of the state’s districts, is being argued in state court under Pennsylvania’s own robust bill of rights, whose origins date back to a state constitution Ben Franklin helped draft in 1776. “There’s a line of court cases that establishes that those clauses have broader protections than the First Amendment,” McKenzie says.

“They cracked Democrats apart, and packed Democrats together, to disadvantage Democrats.”

Republicans fighting to preserve the Pennsylvania map filed motions to stay the trial pending a decision on the Wisconsin map, and to move the case to federal court—actions the League’s lawyers derided as delay tactics and a “cynical misuse of the law.” In early November, the state Supreme Court stepped in and ordered Commonwealth Court Judge Kevin Brobson to hold a trial and make a ruling by December 31 on whether the state constitution’s clauses on freedom of association and equal protection ban excessive partisan gerrymandering, and on whether the Pennsylvania map was designed to deprive Democrats of representation.

The League’s argument that voters’ fundamental rights can be violated when their past voting behavior is used to place them in uncompetitive districts is similar to the one before the US Supreme Court in the Wisconsin case. While a separate case has revealed evidence showing the state’s Republican legislators did, in fact, consider people’s voting records when drawing the 2011 map, it’s unclear whether Judge Brobson, who has prevented the Law Center’s lawyers from asking the legislators about their mapmaking process, will rule that information admissible in his court. So lawyers for the League are using novel statistical methods to show that there is no explanation for the state’s tortured district lines beyond a deliberate attempt to maximize the number of safe Republican districts.

“When this map was drawn, the legislative map drafters burdened those voters based on their past political activity. They cracked Democrats apart, and packed Democrats together, to disadvantage Democrats,” McKenzie argues. “The map discriminates against an identifiable political group, in this case people who vote Democratic. You’re not treating these groups the same.”

“There’s been a lot more belief that you can measure the partisan effect of gerrymandering,” says Michael Li, a voting rights expert at NYU’s Brennan Center for Justice. “The social science and the tools we have to diagnosis this have gotten better.”

The League of Women Voters is using advanced statistical methods to show that Republicans are gaming the system.

One method relies on having a computer generate hundreds of possible alternate maps, and comparing the likely partisan breakdown if each were used. In Pennsylvania, those maps generally produced between 7 and 10 Republican seats—none produced 13. Another method uses something called Markov chain Monte Carlo analysis to generate small random changes along the edges of the districts. This analysis showed that even slight adjustments cut significantly into the Republicans’ advantage—evidence, again, that the map was drawn to game the system.

While a US Supreme Court ruling upholding the lower court’s ruling against partisan gerrymandering in Wisconsin would have the most far-reaching effects, voting-rights advocates in other states are looking at language in their own constitutions that could animate similar challenges. “A lot of people are kicking the tires and watching Pennsylvania closely to see if this is a venue that could be more receptive than the federal courts,” Li says.

Once Brobson issues his ruling, the Pennsylvania Supreme Court will conduct its own review in early 2018. If the elected court, where Democrats hold a 5-to-2 majority, rules in the League’s favor, it could order the map be scrapped and have the Legislature try again, or it could appoint an impartial special master to draw new lines. Voting rights advocates say that new districts could be drawn by April, when military and overseas ballots must go out for May 15 primary elections. There is also a possibility the court could order the primaries delayed to allow more time for the redrawing.

If Pennsylvania’s top court rules the district map illegal, the ruling could create new constitutional guidelines to determine to what degree partisan gerrymandering is allowable—or simply invalidate the current map. In December 2016, the League of Women Voters helped launch another project, Fair Districts PA, which has been lobbying legislators in Harrisburg and conducting a public education campaign in an attempt to put the drawing of future maps in the hands of a citizen commission.

“It’s possible this decision could be narrow and not have any impact beyond 2018 and 2020,” McKenzie says. “Long term, it’s not clear that this lawsuit will take care of the problem of partisan gerrymandering, and Pennsylvania may have to do more.”