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 would serve just one year, not two as expected.

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. But a lawyer who successfully sued over the districts says a special election is the best way to protect the rights of North Carolina residents.