This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

The Pennsylvania Supreme Court threw out the state’s congressional map Monday, ruling that Republican-drawn districts “clearly, plainly and palpably” violate the state’s constitution and ordering that the map be redrawn in the next three weeks.

The ruling could have a major impact on the race for control of the US House in 2018, where Democrats are targeting several Philadelphia-area House seats.

The League of Women Voters had challenged the district map in court, arguing that the state’s congressional lines were “among the most extreme partisan gerrymanders in American history.”

The group alleged that Republicans acted in secret in 2011 to design a map that deliberately packed Democratic voters into five districts, maximizing the GOP advantage everywhere else. Republicans currently hold 12 of Pennsylvania’s 18 seats.

The court ruled that a new map must be submitted to Gov. Tom Wolf, a Democrat, by February 9 — and then Wolf has until February 15 to accept it. If those deadlines are missed, the court said, it will draft a new map itself, with input from the parties.

The ruling comes the same month a three-judge federal panel ruled that North Carolina’s congressional map is unconstitutional because it was drawn primarily with political motives in mind.

Monday’s ruling in Pennsylvania is also unique because the ruling was based on state — not federal — laws.

Republican state lawmakers are expected to ask the US Supreme Court to reverse the state high court’s ruling.

The ruling has thrown this year’s midterm elections in Pennsylvania into flux. The court is allowing a March 13 special election for Republican former Rep. Tim Murphy’s Pittsburgh-area district to go ahead, but is requiring new districts to be in place by the May primary.

Two districts that are all but certain to see major changes in redrawn maps are represented by GOP Reps. Pat Meehan and Ryan Costello. The districts snake through the Philadelphia suburbs and are seen as top Democratic targets in the 2018 midterms.