RALEIGH (WTVD) -- A federal court has ordered North Carolina to redraw House and Senate districts, and to hold special primary and general elections in fall of 2017.The ruling Tuesday by a three-judge panel of the Middle District Court sets a deadline of March 15, 2017, for the state to redraw 28 districts ruled unconstitutional.The ruling requires lawmakers to submit new maps to the court within seven days of passage."While special elections have costs, those costs pale in comparison to the injury caused by allowing citizens to continue to be represented by legislators elected pursuant to a racial gerrymander," the judges wrote Tuesday, adding that despite concerns about lower voter turnout, "a special election in the fall of 2017 is an appropriate remedy."The ruling also means those elected to the state House and Senate a few weeks ago in districts where boundaries now will be altered would serve just one year, not two as expected."North Carolinians deserve fair representation in the state legislature, and that is impossible to achieve with racially gerrymandered districts. A special election in the affected districts in 2017 is the best way to protect the rights of all North Carolinians," said Anita Earls, executive director of the Southern Coalition for Social Justice, which, along with the Poyner Spruill and Tin Fulton law firms, represented the plaintiffs in the lawsuit.Lead plaintiff in the lawsuit, Sandra Covington, a retired elementary teacher from Fayetteville, claimed that as a result of the racially gerrymandered districts she "was plucked out of my district and placed into another district simply because of my race."Republican lawmakers promised to swiftly appeal the decision.Rep. David Lewis (R-Harnett) and Sen. Bob Rucho (R-Mecklenburg), Chairmen of the House and Senate Redistricting Committees, released the following joint statement Tuesday:"This politically-motivated decision, which would effectively undo the will of millions of North Carolinians just days after they cast their ballots, is a gross overreach that blatantly disregards the constitutional guarantee for voters to duly elect their legislators to biennial terms. We continue to believe the maps drawn by the General Assembly, pre-cleared by the Obama Justice Department and twice upheld by our state's elected Supreme Court are constitutional, and we will move quickly to appeal."The ruling mandates the state hold special primary and general elections in the fall of 2017, for the purpose of electing new legislators in these districts and other districts that are redrawn to comply with the order."The North Carolina Democratic Party applauds the federal court's order to redraw these gerrymandered legislative districts," said NCDP Executive Director Kimberly Reynolds. "Our elected officials should fairly represent our state, and redrawn districts will help level the playing field."The primary must be held in late August or early September, the court said."Once again, unconstitutional gerrymandering by the legislature has led to litigation and now the need to hold a special election," said Bob Phillips, executive director of Common Cause North Carolina. "This is a golden opportunity for state lawmakers to put North Carolina voters ahead of partisan politics and establish an independent process for re-drawing the state's legislative maps free from gerrymandering."The general election will be held in early November, the ruling said. The exact date is not yet determined.Those legislators elected will take office on Jan. 2, 2018, and each legislator will serve a one-year term.Lewis and Rucho added that, because the court's original ruling has already been appealed to the U.S. Supreme Court and could well be overturned, Tuesday's directive could force state taxpayers to spend millions of dollars on an "unnecessary special election."Tuesday's order comes a week before the U.S. Supreme Court will hear a similar racial gerrymandering lawsuit involving North Carolina's congressional districts. It could affirm, limit or overturn the August ruling on the legislative maps.