ROCHESTER, N.Y. (WETM) — A New York appeals court ruled on Thursday that some new district maps drawn by Democrats were illegal by violating the state’s constitutional ban on partisan redistricting. The ruling was narrowly made 3-2, by a five-judge court in Rochester, that said the Democrat-led legislature tried to restrict electoral competition when drawing congressional lines and that they need to be re-drawn.

The ruling influences how many Democrats and Republicans are represented in the New York congress, and in turn, could affect what party controls the House of Representatives. It partially upholds a lower-court ruling from Steuben County, where a state Supreme Court judge rejected the congressional maps.

In its opinion, the court relied on testimony by redistricting expert Sean P. Trende, to confirm “that the legislature engaged in unconstitutional partisan gerrymandering when enacting the 2022 congressional map.”

State Democrats are expected to appeal the decision to the New York Court of Appeals, where all judges were appointed by Democrats. It’s the state’s highest court and will have the final say on whether the district lines will be redrawn. The court has been put on a tight deadline, with elections coming up this fall. Judges have indicated that a final verdict will be made as soon as next week.

The maps under consideration drawn by the Democrat-led legislature, and signed into law by Gov. Kathy Hochul, upended four Republican seats and maximized the prospects for Democrats in 22 of the 26 new districts. “We believe that this is blatantly partisan gerrymandering on its face… and the courts should throw these maps out,” said George Winner, an attorney representing the petitioners.

Democrats have rejected this claim, saying the redistricting process was followed exactly as it was supposed to. The court’s ruling does not disagree: “The procedure used to enact the 2022 congressional map is valid.” However, the ruling is clear in its stance, “that the map itself is unconstitutional.”

New York candidates are eager for this legal battle to be over, as this redistricting process has been blaring in the background of congressional campaigns. Many candidates are still unsure of which district they will be running for.