In a 5-4 decision, the U.S. Supreme Court ruled on Monday that Ohio can clean up its voting rolls by clearing people who haven't voted in a while.

The justices rejected arguments that practices by Ohio Secretary of State Jon Husted violate a federal law intended to increase the ranks of registered voters.

Justice Samuel Alito, writing the majority opinion, says Ohio is complying with the 1993 National Voter Registration Act by maintaining its voter lists. He's joined by four conservative colleagues, while all four liberal justices dissented.

"Combined with the two years of nonvoting before notice is sent, that makes a total of six years of nonvoting before removal," Aliso wrote.

In a dissent, Justice Stephen Breyer said the 1993 law prohibits removing someone from voting rolls "by reason of the person's failure to vote. In my view, Ohio's program does just that."

Ohio's rules, which use voter inactivity to trigger a process that can lead to their removal from the voter rolls, are similar to those of states like Pennsylvania, West Virginia and Georgia.

After registered voters miss one federal general election, they receive a mailed notification acting to confirm their address. If voters don't respond and don't vote in the next two general elections, they could be removed from the voter rolls.

Justice Sonia Sotomayor, who filed a separate dissent, said that Congress enacted the voter registration law "against the backdrop of substantial efforts by states to disenfranchise low-income and minority voters."

Ohio said it only uses the process after first comparing its voter lists with U.S. Postal Service lists of changed addresses, but not everyone who moves notifies the post office.

Ohio has sent more than 3 million notices of address confirmation since 2011, when Husted became Secretary of State. The plaintiffs argued that 70 percent of people who received those mailed notifications didn't respond. Tens of thousands of people were listed as stricken or ready for striking in urban counties, but it's not clear how many eligible voters lost their registrations.

Among those removed are Army veterans, who sued the state after being removed while serving in Iraq and Afghanistan.

Husted, who's running as lieutenant governor on the Republican ticket, called the decision a "victory for electroal integrity." But civil rights groups decried the decision, saying the Supreme Court should make it easier for people to vote rather than allowing states to put up roadblocks.

State Rep. Kathleen Clyde, the Democratic candidate for Ohio Secretary of State, said in a statement that she was "deeply disappointed in this ruling" and urged Husted to "act with restraint."

"We are now only 5 months from our next federal election and any rush now to remove a backlog of up to 589,000 voters that he has marked for purging will be extremely disruptive and unfair to Ohio voters," Clyde wrote.

In a tweet Monday morning, Sen. Sherrod Brown (D-Ohio) said that "today's decision empowers Ohio to further strip away the right to vote for thousands of Ohioans, threatening the integrity of our state's election process."

Ohio Attorney General Mike DeWine, who's running as the Republican candidate for governor, issued a statement applauding the Supreme Court's decision for showing "that Ohio was following federal law in maintaining accurate voter rolls."

Last week, President Donald Trump said he would nominate Eric Murphy, the Ohio lawyer who argued the case on the state's behalf, to a seat on the Cincinnati-based 6th U.S. Circuit Court of Appeals. A three-judge panel from that court ruled 2-1 that Ohio's practice was illegal.

The Associated Press contributed to this report.