WICHITA, Kan. — Kansas Secretary of State Kris Kobach must instruct county election officials to notify thousands of people that their votes will be counted for all races on the November ballot, a judge has ruled.

Shawnee County District Judge Larry Hendricks’ decision affects more than 19,545 potential voters who registered at motor vehicle offices or with a federal form without providing documentary proof of U.S. citizenship. The judge told The Associated Press last week that his earlier order requiring those votes to be counted for the primary would remain in effect during the general election, and that provision is part of his ruling made public Tuesday.

Hendricks has blocked a dual system Kobach tried to implement that would have thrown out votes cast in state and local elections. Two recent federal court rulings are already forcing Kansas to let these residents vote in federal elections.

The judge stopped short of issuing the permanent order sought by the American Civil Liberties Union at last week’s hearing, criticizing Kobach for delaying a final decision by questioning whether a 90-year-old World War II veteran who is among the plaintiffs is a U.S. citizen with standing to sue.

Hendricks said his temporary injunction is the most equitable solution given the “highly unusual, time-sensitive, and fundamentally important nature of this litigation vis-a-vis the right of citizenship suffrage.”

Kobach’s office said he was reviewing the decision and would comment later.

The ruling is the latest legal setback for the Kansas Republican who has been embroiled in at least four lawsuits challenging the state’s proof of citizenship requirements. Kobach faces a hearing Friday in federal court to explain why he shouldn’t be held in contempt in a separate federal case.

But none of those voting rights lawsuits affect roughly half of prospective voters who did not use the federal form or who registered at places other than at motor vehicle offices since the state law took effect in January 2013. Those Kansans cannot register to vote at all until they also provide citizenship documents such as a birth certificate, passport or naturalization papers.

“The proof-of-citizenship law is still a problem, even after all this litigation,” said Dale Ho, director of the ACLU’s voting rights project. “Assuming we are successful on appeal, we will have freed half of registrants in Kansas from unnecessary, bureaucratic hoops — but there is obviously more work that needs to be done. The Kansas Legislature could make this easy on everyone and repeal this failed law.”