A three-judge Superior Court panel has ruled that the state’s fledgling judicial retention system for N.C. Supreme Court justices is unconstitutional.

The ruling immediately affects this year’s race by Associate Justice Robert Edmunds, who is seeking another term in the state’s highest court.

The judicial retention law, passed by the General Assembly in 2015, allows a sitting Supreme Court justice who already has won an election to face a retention vote rather than have an election with other candidates. Under the plan, voters would be asked to decide only whether to give the justice a new eight-year term.

Wake County attorney Sabra Faires and two Wake County voters challenged the constitutionality of the new law, saying a retention vote does not meet the constitutional requirement of an election. The complaint said that Faires wanted to be a candidate for associate justice in the seat Edmonds now occupies, but was denied that opportunity because the new law does not allow her to run.

Three state Superior Court judges — Anna Mills Wagoner, Lisa Bell, and Ben Alford — heard arguments on the case earlier this week.

Josh Lawson, general counsel for the State Board of Elections, said the Attorney General’s Office notified the board that the judges had ruled unanimously against the law. Noelle Talley, a spokeswoman for Attorney General Roy Cooper, a written opinion is unlikely to be available until next week.

Any appeal would bypass the N.C. Court of Appeals and go directly to the N.C. Supreme Court.