CLEVELAND (Reuters) - Ohio’s practice of rescinding voter registrations from people who fail to cast ballots is illegal, a court ruled on Friday, the latest legal decision affecting voting rights ahead of the U.S. presidential election on Nov. 8.

The decision by the U.S. Court of Appeals for the Sixth Circuit in Cincinnati reversed an earlier ruling by a federal judge in June and could lead to the reinstatement of thousands of voters in the politically crucial swing state of Ohio.

“We don’t believe that any voters should be removed from the rolls simply because they haven’t voted in a few elections,” said Mike Brickner, senior policy director at the American Civil Liberties Union, which brought a lawsuit against the practice along with other advocates.

Voting rights cases have become pivotal battlegrounds in the lead-up to the hotly contested presidential vote between Democratic party candidate Hillary Clinton and her Republican counterpart Donald Trump.

The ACLU and others have challenged laws in Wisconsin, Michigan, North Carolina over voting rights issues. On Friday Texas asked the U.S. Supreme Court to reinstate a law requiring authorized identification to be presented before a citizen may vote.

At issue in the Ohio case is a policy of purging voters who fail to cast ballots over a six-year period and do not respond to a letter from the state asking if they have moved.

A Reuters analysis showed that at least 144,000 voters had been removed from Ohio’s rolls since the last presidential election.

In their lawsuit, the ACLU and other plaintiffs argued that the process violates federal voting rights law, which prohibits removing voters from the rolls simply because they have been inactive.

In June, a federal judge disagreed, ruling that an exception in the law protected Ohio’s practice. But the appellate court said on Friday that because the removal process was triggered solely by someone’s failure to vote, it was not legal.

The appeals court sent the case back to U.S. District Judge George C. Smith to consider possible remedies, including reinstating all voters removed under the process.

Ohio Secretary of State Jon Husted, a Republican, said the state would appeal if Smith orders all of the purged voters to be reinstated, arguing that would open the state to potential fraud by people impersonating voters who have died or moved away.

“This ruling overturns 20 years of Ohio law and practice, which has been carried out by the last four Secretaries of State, both Democrat and Republican,” Husted said.