Three North Carolina judges ruled Monday that new congressional district lines approved by the state legislature last month can stand for the 2020 elections, bringing to a close a decade of legal wrangling in one of the nation’s most contentious redistricting fights.

The new maps are likely to hand Democrats a net gain of at least two additional seats in Congress. Under the district lines in effect in the 2018 midterm elections, Republicans held 10 of North Carolina’s 13 seats. Under the new version, eight of those seats are likely to elect Republican members of Congress, and five favor Democrats.

The three-judge panel ordered the Republican-led state legislature to redraw maps earlier this year. The plaintiffs who initially sued objected to the newest versions, which do not include any substantially competitive districts. But the judges disagreed, siding with the legislature.

“The Democratic Party’s scheme to use judges to effectuate a Democratic gerrymander has failed,” said state Sen. Ralph Hise (R), the co-chairman of the Senate Redistricting Committee. After the ruling, he said, “we can finally put this decade of relentless litigation behind us.”

Democrats said they would not appeal Monday’s ruling. Filing for congressional districts opened Monday and run until Dec. 20.

“North Carolina Democrats will not stop fighting for truly fair maps where voters — not undemocratically-elected politicians — choose their representatives, and we look forward to sending new representatives to Congress who will better reflect our state’s values,” state Democratic Party Chairman Wayne Goodwin said in a statement.

The race to draw new maps set off a flurry of lobbying from incumbent members of Congress who wanted the legislature to save their seats. Several North Carolina sources said Republican incumbents mounted a quiet but determined campaign to woo legislators, some of whom were eyeing opportunities to run themselves.

The new maps jeopardize two sitting Republicans who suddenly find themselves in much more Democratic territory.

Holding has not said whether he will run for reelection in 2020, and several prominent Democrats have already signaled they will run.

“I ran for Congress on the promise of people over politics. That promise will not be overridden by hasty judicial action or the calculations of others,” Walker said in a statement.

The new boundaries will require other members of North Carolina’s delegation to introduce themselves to new voters.