Seventeen-year-olds in Ohio have been able to vote in all primary elections since 1981, provided they would turn 18 by the time the final elections were held in November. That right was threatened this year by Republican Secretary of State Jon Husted, who decided that the law did not pertain to presidential primaries. But nine 17-year-olds filed suit, and a state judge ruled in their favor on Friday — so the 2016 Ohio primary will include these young voters after all.

The secretary issued an instruction manual for election officials last year, explaining that 17-year-olds can vote “solely on the nomination of candidates, and not in the presidential primary because delegates are elected and not nominated.” The nine almost-legal teens filed their suit just last Tuesday, asking Franklin County Common Pleas Court Judge Richard Frye to rule that Husted’s interpretation was wrong.

The secretary was not happy with the ruling, handed down four days before the primary. He had planned an appeal, but abandoned the idea because there would not be enough time to make changes even if they were granted. “This last minute legislating from the bench on election law has to stop,” said Husted.   The secretary assumed no responsibility himself, although he had years to study the law. (Husted has been in office since 2011.)

Judge Frye noted, in his ruling that no secretary of state had interpreted the law as Husted did during the 35 years it has been on the books.

The Sanders campaign had also filed suit to correct Husted. Sanders’ campaign notoriously attracts a very high percentage of young voters.

Fox News also covered the story, but couldn’t get it quite right, reporting that Tuesday would mark the first time 17-year olds could vote in an Ohio presidential primary.