Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — The U.S. Supreme Court seemed inclined Wednesday to rule for Ohio in a legal fight over the state's method for removing people from the list of registered voters.

Civil rights groups say it discourages minority turnout. But a lawyer for the state told the court that the process helps keep voter registration lists accurate and up to date. And a bare majority of the justices seemed to agree with the state officials.

"They want to protect the voter roll from people that have moved, and they're voting in the wrong district," said Anthony Kennedy, often the deciding vote when the court is closely divided. "What we're talking about are the best tools to implement that purpose."

At issue is a method Ohio uses to identify people who have moved and are no longer eligible to vote. The state sends notices to those who fail to cast a ballot during a two-year period. People who do not respond and don't vote over the next four years, including in two more federal elections, are dropped from the list of registered voters.

That's what happened to Larry Harmon, a U.S. Navy veteran and software engineer who was turned away from his polling place in 2015 when he wasn't on the list.

"I looked and I looked. And I saw my son's name, but I didn't see my name," he says. So he joined a civil rights group in suing the state. Ohio said he was sent a notice, but he says he didn't get it.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Larry Harmon sits in his home in Kent, Ohio. Maddie McGarvey / for NBC News

A federal appeals court ruled for the state, concluding that roughly 7,500 Ohio voters — in a state that's perennially a presidential battleground — were wrongly purged from the list in the 2016 election.

Paul Smith, a Washington lawyer representing the challengers, said the state's method is flawed.

"The reality is that the failure to vote for two years tells you almost nothing about whether or not anybody has moved," he said. "Fifty or 60 percent of the voters in Ohio routinely don't vote over a two-year period."

And Smith said surveys show that most people who receive a notice after not voting simply throw it away.

He said Ohio is violating the National Voter Registration Act, which specifies that voters can be purged from the rolls only if they ask, move, are convicted of a felony, become mentally incapacitated, or die.

The court's liberal justices seemed to side with the challengers.

"You have a right not to vote," said Sonia Sotomayor.

But Chief Justice John Roberts said a failure to vote or respond to a notice tells the state something about whether a voter has moved.

The Justice Department supported the challengers in the early stages of the court fight, but the Trump administration switched sides and argued Wednesday for the state.

Solicitor General Noel Francisco said Ohio's system strikes a balance between "on the one hand dramatically increasing the number of voters on the voter rolls but, on the other, giving states the flexibility they need to manage the issues that arise when you have over-inflated voter rolls."

Professor Rick Hasen, an election law expert at the University of California at Irvine, says if the court sides with Ohio, "you'll see more red states making it easier to drop people from the voter registration rolls, and it's going to continue what I call the voting wars between the parties."

At least a dozen other states have suggested they will follow Ohio's lead if the state wins.

The court will decide the case by late June.