RALEIGH, N.C. _ A panel of federal judges struck down North Carolina's election districts for U.S. Congress on Tuesday as unconstitutional partisan gerrymanders and gave lawmakers until Jan. 29 to bring them new maps to correct the problem.

The ruling comes in cases filed by the League of Women Voters and Common Cause in North Carolina stemming from maps adopted in 2016 during a special legislative session.

The judges - James A. Wynn, a Barack Obama appointee to the 4th U.S. Circuit Court of Appeals, and federal District Judges W. Earl Britt, a Jimmy Carter appointee, and William L. Osteen Jr., a George W. Bush appointee _ were unanimous that North Carolina lawmakers under Republican leadership violated the Constitution's equal-protection clause when they drew maps explicitly to favor their party.

"On its most fundamental level, partisan gerrymandering violates 'the core principle of republican government ... that the voters should choose their representatives, not the other way around,'" the majority opinion states.

Wynn and Britt also found that the 2016 redistricting plan designed to give North Carolina Republicans wins in 10 of the 13 districts also violated the free speech of the challengers by trying to weaken the voices of Democrats with whom they did not agree. Osteen dissented from his colleagues on that point, but agreed overall that the maps were unconstitutional.

The lawmakers, Wynn wrote in the opinion for the majority, "do not dispute that the General Assembly intended for the 2016 Plan to favor supporters of Republican candidates and disfavor supporters of non-Republican candidates. Nor could they. The Republican-controlled North Carolina General Assembly expressly directed the legislators and consultant responsible for drawing the 2016 Plan to rely on 'political data' - past election results specifying whether, and to what extent, particular voting districts had favored Republican or Democratic candidates, and therefore were likely to do so in the future - to draw a districting plan that would ensure Republican candidates would prevail in the vast majority of the state's congressional districts."

During the legislative session in which the maps were drawn, Rep. David Lewis, a Harnett County Republican who has shepherded the state's recent redistricting efforts, announced that the maps were drawn to give Republicans a large majority.

"I propose that we draw the maps to give a partisan advantage to 10 Republicans and three Democrats because I do not believe it's possible to draw a map with 11 Republicans and two Democrats," Lewis said at the time.

That comment has provided the underpinnings for a lawsuit that sets North Carolina apart from other partisan gerrymander challenges. A separate case in Wisconsin that is before the U.S. Supreme Court relies more heavily on a proposed statistical formula called "the efficiency gap," which counts the number of votes wasted when voters are shifted into districts where their votes won't matter, either because their party's candidate can't win or is already sure to win.

The North Carolina challengers argue, like the challengers in Wisconsin, that the maps drawn discriminate against Democratic candidates and voters because of their political beliefs. They say the lawmakers who either "packed" them into a single district or "cracked" their district into multiple districts to weaken their influence are robbing them of free speech and equal protection rights because their opinions differ from the lawmakers in power.

Republicans contend that such arguments and formulas are not for the courts to decide - that redistricting is a legislative duty in North Carolina. The lawmakers, Wynn wrote, "do not argue - and have never argued - that the 2016 Plan's intentional disfavoring of supporters of non-Republican candidates advances any democratic, constitutional, or public interest. Nor could they. Neither the Supreme Court nor any lower court has recognized any such interest furthered by partisan gerrymandering - 'the drawing of legislative district lines to subordinate adherents of one political party and entrench a rival party in power.'"

News of the ruling brought quick applause from Democrats and swift criticism from Republicans.

Legislative leaders plan to appeal to the U.S. Supreme Court, according to a spokeswoman for Republican state Sen. Ralph Hise, who along with Lewis has led redistricting efforts in the legislature. North Carolina Democratic Party Chairman Wayne Goodwin called the ruling a "major victory for North Carolina and people across the state whose voices were silenced by Republicans' unconstitutional attempts to rig the system to their partisan advantage."

"Republicans have shown time and time again they are more interested in drawing themselves into power than representing the best interest of their constituents," Goodwin said in a statement. "It's time the General Assembly put partisanship aside and draw fair, nonpartisan maps that give North Carolina voters a voice."

Dallas Woodhouse, executive director of the North Carolina Republican Party, sent out a tweet criticizing Wynn. "It is incredibly disappointing activist Judge Jim Wynn is waging a personal, partisan war on North Carolina Republicans," Woodhouse said on Twitter.

Wynn has been on a panel of federal judges that has ruled against the state in other redistricting cases that found districts to be unconstitutional racial gerrymanders and who wrote a critical opinion striking down a 2013 election law overhaul and voter ID law, saying it with near "surgical precision" targeted African-American voters, who often support Democrats.

--By Anne Blythe The News & Observer (Raleigh, N.C.)