RALEIGH, N.C. (AP) — North Carolina’s highest court found problems Friday with the way that legislators advanced a voter identification mandate approved by citizens on the 2018 ballot, but the justices stopped short of striking it down.

The North Carolina Supreme Court ruled that a lower court should hold more hearings to consider whether the voter ID mandate and a second constitutional amendment should be nullified because the lawmakers who put them on the ballot were elected from districts tainted by illegal racial bias. The other amendment limited income tax rates.

The ruling is a victory for the state NAACP, which sued Republican legislative leaders.

The ruling undoes a state appeals court ruling that upheld the amendments. The ruling sends the case back to a trial court for a new evidentiary hearing on whether they should remain in place.