(Reuters) - A North Carolina court on Monday temporarily blocked the state from using its congressional map in next year’s elections and strongly suggested it would eventually rule the districts were illegally gerrymandered to favor Republicans.

Slideshow ( 2 images )

The decision was a victory for Democrats, who have struggled to gain a foothold in both the state legislature and North Carolina’s 13 U.S. congressional districts, in part because of how Republicans drew the electoral lines.

The ruling seems likely to ensure that the state’s 2020 congressional elections will take place under a new map, dealing a blow to Republicans’ hopes of recapturing the U.S. House of Representatives after Democrats swept to power in that chamber last year.

Republicans hold 10 of the state’s 13 U.S. House seats, despite a nearly even split between Democratic and Republican votes in the popular count.

In an 18-page ruling, the judges said the voters who brought the lawsuit had shown a “substantial likelihood” of succeeding if the case were to reach trial.

The three-judge panel in Wake County Superior Court that issued the decision is the same group that struck down the state’s legislative map in September, finding that it violated the state constitution’s free elections, equal protection and free speech clauses.

A similar challenge failed at the U.S. Supreme Court in June, when the court ruled federal judges had no jurisdiction over partisan gerrymandering, the act of drawing electoral lines to benefit one party over another.

But the Supreme Court’s decision explicitly said that state courts may consider the issue under state law. Numerous state constitutions, like that of North Carolina, contain language that goes further than the U.S. Constitution in governing the way elections are held.

“With judges deciding behind closed doors how many members of Congress from each party is acceptable, judicial elections have become the most consequential in America,” Phil Berger, the Republican leader of the state Senate, said in a statement.

Last year, the Pennsylvania Supreme Court threw out the state’s U.S. congressional lines. The new map was credited with helping Democrats split the state’s 18 congressional seats in 2018 after years of Republican dominance.

Both North Carolina gerrymandering challenges were backed by the National Redistricting Foundation, the litigation arm of a Democratic group founded by former U.S. Attorney General Eric Holder to help break Republican control of the redistricting process in states across the country.

“For nearly a decade, Republicans have forced the people of North Carolina to vote in districts that were manipulated for their own partisan advantage,” Holder said in a statement. “Now — finally — the era of Republican gerrymandering in the state is coming to an end.”