A panel of federal judges threw out North Carolina's congressional map on Tuesday, ruling the Republican-drawn map an unconstitutional partisan gerrymander and ordering the General Assembly to redraw the districts before the U.S. House elections.

The ruling not only forbids the state of North Carolina from holding 2018 U.S. House elections until the districts are redrawn, but the state will also have a court-appointed special master to help fix the issue. The legislature has until the end of the month to come up with a new map.

The cases were filed by the League of Women Voters and Common Cause in North Carolina in response to maps drawn in 2016 during a special legislative session.

The court noted partisan public statements made by Republican mapmakers during the time of the congressional redistricting, which show they had set aside racial data during mapping.

The opinion on the ruling was majority-authored by 4th U.S. Circuit Court of Appeals Judge James Wynn.

"Rather than seeking to advance any democratic or constitutional interest, the state legislator responsible for drawing the 2016 Plan said he drew the map to advantage Republican candidates because he 'think[s] electing Republicans is better than electing Democrats,'" Wynn wrote. "But that is not a choice the Constitution allows legislative map drawers to make."

The Charlotte Observer reported that Republicans are planning to appeal the decision to the Supreme Court.