Photo

A group of 17-year-olds in Ohio has successfully persuaded a state judge to allow them to vote in the state’s primary on Tuesday.

The ruling, in state court, came before another suit by Senator Bernie Sanders of Vermont could be decided in federal court. Mr. Sanders sued Ohio’s top elections official, Secretary of State Jon A. Husted, in federal court on Tuesday arguing that Mr. Husted had “arbitrarily” discriminated against young black and Latino voters by not allowing 17-year-olds who will be 18 by the general election in November to vote in the primary on Tuesday.

On Friday, an Ohio state judge ruled that the teenagers can vote in the primary as well as in congressional, legislative and mayoral races. Mr. Husted has vowed to appeal the decision.

Brad Deutsch, Mr. Sanders’s lawyer, praised the state court’s ruling Friday.

“This is a huge victory for 17-year olds across Ohio,” Mr. Deutsch said in a statement. “Their votes for presidential nominees will now count when they vote on either Tuesday or over the weekend in early voting.”

He also said the judge had “admonished the secretary of state for abusing his discretion by prohibiting 17-year-olds from voting for presidential candidates and not only directed the secretary to instruct poll worker to allow 17-year olds to vote but also instructed them to make a reasonable effort to attempt to determine and record choices that have already been made by any 17-year-old who already voted in early voting.”

In a statement Friday saying he would appeal the decision, Mr. Husted said, “This last-minute legislating from the bench on election law has to stop.”

“We will appeal this decision because if there is a close election on Tuesday we need clarity from the Supreme Court to make sure that ineligible voters don’t determine the outcome of an election,” he said.

Michael Briggs, a spokesman for Mr. Sanders, said he expected that the state ruling would be appealed this weekend. He added that the federal judge dealing with Mr. Sanders’s lawsuit has said that he will rule in federal court by Monday afternoon.

At least 20 states allow 17-year-olds to participate in presidential primaries or caucuses if they will be 18 on Election Day in November, according to FairVote, a voting-rights advocacy group.

In December, Mr. Husted, a Republican, said that under state election law, 17-year-olds could vote in nominating contests but not elections, and thus a presidential primary was off-limits since voters will be electing delegates to the party conventions.

Talking to reporters in Toledo before boarding a plane to Illinois, Mr Sanders said he was “delighted” by the decision.

“The idea that in the year 2016, we have Republican secretaries 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. “Our jobs is to get more people involved in the process, not fewer people, and I am glad that decision was won and I am confident that it will be sustained.”

Also at the Toledo rally, Representative Marcy Kaptur of Ohio announced her endorsement.

“America could have no stronger Democratic leader for jobs in America, for fair trade and for economic progress for all, not just the privileged few, than Bernie Sanders,” Ms. Kaptur said as she introduced him in front of 2,600 supporters.

Mr. Sanders, addressing the recent incidents of violence at Donald J. Trump rallies, said he hoped that the nation was not at a point “where people are going to be intimidated and roughed up and frightened about going to a political rally.”

“We all have different points of view, that’s called democracy,” Mr. Sanders said. “Rallies and events are part of American democracy,” he said, adding, “And I hope Mr. Trump speaks out forcefully and tells his supporters that that is not what the American political process is about.”

Find out what you need to know about the 2016 presidential race today, and get politics news updates via Facebook, Twitter and the First Draft newsletter.