The Pennsylvania Supreme Court imposed a new congressional map for the state that appeared to give Democrats a big boost in their effort to retake the U.S. House of Representatives in November’s midterm elections.

The new map could flip at least four Republican-held seats in those contests, according to an analysis from the Cook Political report, an assessment echoed by other political experts.

The state high court imposed the map as a remedy after it ruled last month that Republicans had unlawfully redrawn the state’s districts to maximize GOP gains. The new map laid out fresh district boundaries for the state’s 18 congressional seats that were based on criteria like geographical compactness instead of partisan advantage.

Pennsylvanians often split closely between Democrats and Republicans in the voting booth, but that hasn’t been reflected in the state’s congressional delegation, which has tilted 13-to-5 in favor of Republicans under the district lines the GOP drew in 2011 after the party swept the 2010 elections.

The Pennsylvania court’s action is part of a national re-examination of redistricting that has been unfolding in state legislatures, among political activists and in the federal courts. The U.S. Supreme Court is considering two major cases, from Wisconsin and Maryland, to decide whether and how to impose constitutional limits on partisan gerrymandering. The decisions, expected by the end of June, could have a major impact nationwide.