A three-judge panel in North Carolina ruled Monday that the new congressional district map drawn by Republicans last month would stand for 2020, and that candidates could begin filing for next year's federal elections immediately.

The ruling is a blow to Democrats, who argued the map, passed along party lines by state lawmakers in November, was just another partisan gerrymander and an outside expert was needed to ensure fair voting maps. Their last-ditch challenge was up against the wire, however. Monday was the deadline for U.S. House candidates to file ahead of the primary in March, and the court had suspended any action while they considered the case.

"Although one can certainly argue that the process was flawed or that the result is far from ideal, the net result is that the previously flawed 2016 congressional map has been replaced,” Judge Paul Ridgeway said from the bench.

The ruling, which likely wraps up a decade of protracted legal battles over the boundaries that can decide elections, comes after a series of court decisions around the issue. In September, a court ruled the state legislative maps were partisan gerrymanders and demanded that the legislature redraw them. In October, the same court blocked the use of the previous congressional district maps for the same reasons and directed legislators to draw another set of maps. The plaintiffs — voters in the state, bankrolled by national Democrats — could still appeal to the state Supreme Court.

In November, legislators redrew the congressional district map — including two new Democratic-leaning districts — in committee meetings that were required to be live streamed. That map, which passed the state Senate without a single Democratic vote, still gave Republicans an 8-5 seat advantage, and national Democrats went to court, claiming the maps were still a partisan gerrymander.

North Carolina Democrats raised concerns about the process, pointing to a Republican leader who appeared to be discussing potential changes with allies behind closed doors, but Republicans said they were redistricting without an eye to partisan outcomes and argued Democrats just wanted more favorable maps.

Under the new boundaries, Republican Reps. George Holding and Mark Walker, who represent the districts around Greensboro and Raleigh, would likely face tough re-election battles. Previously, the cities were split into different districts, diluting the urban, Democratic voters between more rural, red districts. Under the new maps, they are expected to trend more blue.

The map allowed to stay in place Monday will be used just once. After the census next year, the voting lines will be redrawn again in 2021.