RALEIGH, N.C. (AP) — Changes made to North Carolina’s elections board over the last year were unconstitutional, but the board can remain in place through the November elections, a three-judge panel ruled Tuesday.

The 2-1 decision agrees with Democratic Gov. Roy Cooper’s argument that the Republican-controlled General Assembly went too far in limiting his authority to name the board.

However, a proposed amendment to the state constitution on the ballot would allow lawmakers to name board members. Cooper twice sued to keep it off the ballot. He won the first time, but after the amendment was rewritten to remove attempts to strip the governor of powers to appoint members of other boards and commissions, the lawsuit was thrown out and the amendment is left up to voters to decide.

Elections board spokesman Pat Gannon told The News & Observer of Raleigh the board is still reviewing the order and had no comment.

Cooper and Republican lawmakers have been embroiled in litigation and political disputes since Cooper was elected governor in 2016. Lawmakers have passed several bills that eroded Cooper’s powers. The elections board is important because its members can approve early-voting sites that could affect election turnout. They can also assess campaign finance penalties and determine ethics law violations.

Republicans began altering the board’s makeup days after Cooper’s narrow victory over Republican Gov. Pat McCrory was finalized in December 2016. Cooper sued legislative leaders right away, and the same three judges who issued the latest ruling — Judges Jesse Caldwell, Todd Burke and Jeffery Foster — threw out the first altered board as unconstitutional.

Lawmakers tried again by creating another eight-member board — appointed by Cooper but evenly divided among Democrats and Republicans. A closely divided state Supreme Court in January ruled that version was unlawful, too, deciding the board’s composition, when combined with other alterations, left Cooper unable to fulfill his duties to ensure election laws were followed.