Democratic presidential candidate Sen. Bernie Sanders (Vt.) holds a campaign rally Friday in Toledo, Ohio. (Rebecca Cook/Reuters)

An Ohio judge ruled Friday that 17-year-olds will be able to vote in Tuesday’s presidential primaries here if they turn 18 by the general election, weighing in on a dispute in which Democratic hopeful Sen. Bernie Sanders has taken a keen interest.

Under Ohio law, 17-year-olds with upcoming birthdays are allowed to participate in primary elections. But under his interpretation of the law, Secretary of State Jon Husted (R) has said, that right doesn’t include the presidential race.

Sanders, the senator from Vermont who has attracted young voters to the polls in far greater numbers than party rival Hillary Clinton, filed a separate federal lawsuit against Husted earlier this week. A judge in that case indicated Friday that he wants to let the state case move forward first.

The Sanders campaign hailed the state ruling Friday afternoon as the senator was holding a rally here in Toledo. Sanders said he was “delighted” with the ruling.

“The idea that, in the year 2016, we have a Republican secretary of state trying to suppress the vote, trying to make it difficult for young people to participate in the political process, is an outrage,” he said.

Tracking the race to the Democratic nomination

Husted said this week that Ohio law allows the 17-year-olds in question to participate in the nomination of candidates but not to help elect candidates. Technically, he said, what voters will be doing in the presidential race Tuesday is electing delegates to represent them at the Democratic and Republican national conventions.

Sanders’s campaign manager, Jeff Weaver, has called that interpretation “narrow, formalistic and wrong.”

The state lawsuit was filed on behalf of a group of 17-year-olds led by the Fair Elections Network, an advocacy group.

“Engaged, civic-minded young adults are who we encourage to participate in our democracy,” said Rachel Bloomekatz, a lawyer for the young voters. “I hope this ruling provides that encouragement.”

The office of Ohio’s secretary of state said it will not appeal Friday’s ruling.

Ohio is one of five states holding primaries Tuesday, along with Florida, Missouri, Illinois and North Carolina.

In Tuesday’s Democratic primary in Michigan, Sanders won among those ages 18 to 29 by a margin of 81 percent to 18 percent, according to exit polls reported by CNN.