RALEIGH, N.C. (AP) — Federal judges have told the North Carolina legislature to redraw its own districts by mid-March to replace ones the court struck down and to hold a special election under redrawn maps in November 2017.

The ruling Tuesday means those elected to the state House and Senate a few weeks ago and who see their districts changed would serve just one year, not two.

The same three-judge panel last summer said nearly 30 legislative districts were illegal racial gerrymanders but decided it was too late to hold elections under new maps.

Attorneys representing legislative mapmakers wanted more time to redraw and the next election in 2018. Those lawmakers now say they’ll appeal Tuesday’s decision. A lawyer who successfully sued over the districts says a special election is best to protect the rights of North Carolina residents.

Copyright 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.