The D.C. Court of Appeals says the council acted illegally in delaying the first election for attorney general.

In a sharp reversal of course, D.C. residents could vote for an attorney general as soon as November after the District’s highest court ruled Wednesday that city lawmakers acted illegally in delaying the first such election.

The D.C. Court of Appeals ruling is a rebuke to the D.C. Council, which voted 7 to 6 last July to push back the debut election of the city’s top legal officer until at least 2018.