Image copyright Getty Images Image caption The judges ordered the maps to be re-drawn by the end of the month

A panel of US federal judges have ruled that North Carolina's congressional district voting map is unconstitutional and illegally favours Republicans.

The panel ordered the state to re-draw the 2016 map designed by the Republican-controlled General Assembly.

It was the first federal court ruling to block a map due to gerrymandering, when congressional maps are re-drawn to favour political parties.

The state has until 29 January to submit a new plan with the court.

Judge James A Wynn Jr of the 4th US Circuit Court of Appeals wrote that "partisan gerrymandering runs contrary to numerous fundamental democratic principles and individual rights".

On Assignment: Gerrymandering in the US

North Carolina Senate Redistricting Chairman Ralph Hise told the Reuters news agency through a spokeswoman that lawmakers would appeal the decision, which comes ahead of the 2018 mid term elections.

Dallas Woodhouse, the state's Republican Party Executive Director, said the ruling was considered "partisan war on North Carolina Republican voters".

Meanwhile, North Carolina Democrats praised the decision, calling it a "major victory".

"Today's ruling is 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," Democratic Chairman Wayne Goodwin said.

Courts have previously turned down redistricting plans on the claim that they were racially discriminatory, but this case marks the first a court has taken a ruling on partisan gerrymandering.

Last year a separate panel struck down two majority black districts in North Carolina that were drawn in 2011 after judges ruled the map was racially discriminatory. The new map prompted a new round of lawsuits.

Glossary: US elections

The US Supreme Court has yet to rule on partisan gerrymandering, but the high court is currently considering two cases - one from Wisconsin and another from Maryland.

Former US Attorney General Eric Holder, who has railed against gerrymandering, called on North Carolina to "finally produce fair maps".

"Today's ruling was just the latest example of the courts telling state legislators in North Carolina that citizens should be able to pick their representatives, instead of politicians picking their voters," he said in a tweet.

What is gerrymandering?

Maps are re-drawn by lawmakers periodically, in order to assign congressional representatives in proportion to US census data.

The practice of gerrymandering has grown and become more specific since the invention of modern computing technology, which allows politicians to more easily identify their supporters.

The term is named after 18th Century vice-president and Massachusetts governor Elbridge Gerry, who approved a politically carved-up voting district that was likened in shape to a salamander.