Voting stickers are seen as voters cast their ballots for the Ohio primary at Saint Columba Social Hall in Youngstown, Ohio March 15, 2016. REUTERS/Aaron P. Bernstein

CLEVELAND (Reuters) - A federal judge ruled on Wednesday that Ohio’s secretary of state was within his rights to strip thousands of inactive voters from the rolls, rejecting a legal challenge by civil liberties activists who claimed that the purge disenfranchised minorities and the poor.

The decision by U.S. District Judge George C. Smith in a lawsuit brought by the American Civil Liberties Union could impact the presidential race in Ohio, a key swing state seen as potentially pivotal in the Nov. 8 election. No Republican has won the White House without carrying Ohio.

The ACLU charged in its lawsuit that Ohio Secretary of State John Husted’s policy of removing from the rolls voters deemed inactive over a six-year period violated the National Voter Registration Act of 1993 because it targets minorities and lower-income voters who tend to favor Democrats.

Smith disagreed, finding that the policy was not illegal because it removed voters from the rolls only after they failed to vote and then did not respond to a change of address confirmation.

“Ohio’s procedures of maintaining the voter registration rolls ensure the integrity of the election process,” Smith wrote.

Husted has said that the policy has been in place since the 1990s under both Republican and Democratic secretaries of state.

“While today’s ruling reaffirms that the process Ohio has used for over two decades is constitutional and in line with state and federal law, the best news is that we can put another wasteful lawsuit behind us and focus on the important work of running elections in Ohio,” Husted said in a statement.