Washington(CNN) The Supreme Court on Monday ruled that Ohio's method of removing names from its voter rolls does not violate federal law.

The decision was 5-4.

Monday's ruling concerning the battleground state comes as the country gears up for midterm elections this fall. At least six other states have similar laws, and the ruling could embolden others to follow suit and enact what critics say are aggressive purges of voter rolls.

Ohio law allows the state to send address confirmation notices to voters who have not engaged in voter activity for two years. If a voter returns the notice through prepaid mail, or responds online, the information is updated. If the notice is ignored and the voter fails to update a registration over the next four years, the registration is canceled.

"We have no authority to second-guess Congress or to decide whether Ohio's supplemental process is the ideal method for keeping its voting rolls up to date," Justice Samuel Alito wrote for the conservative majority. "The only question before us is whether it violates federal law."

Ohio Secretary of State Jon Husted, a Republican, said the ruling is a "validation" of the state's law.

"Today's decision is a victory for election integrity, and a defeat for those who use the federal court system to make election law across the country," Husted said in a statement. "This decision is validation of Ohio's efforts to clean up the voter rolls and now with the blessing nation's highest court, it can serve as a model for other states to use."

A dissent from Justice Sonia Sotomayor and liberal justices argued that the court ignored a history of voter suppression that the National Voter Registration Act, commonly referred to as the motor voter law, was meant to address.

"Congress enacted the NVRA against the backdrop of substantial efforts by states to disenfranchise low-income and minority voters, including programs that purged eligible voters from registration lists because they failed to vote in prior elections," Sotomayor wrote.

"The Court errs in ignoring this history and distorting the statutory text ... ultimately sanctioning the very purging that Congress expressly sought to protect against," she added.

"The Supreme Court has just given a stamp of approval to voter suppression," said Liz Kennedy, senior director of Democracy and Government Reform at the Center for American Progress. "Ohio's system of purging voters that choose not to participate in some elections unfairly silences hundreds of thousands of voters in the state, especially people of color and the homeless."

Steve Vladeck, CNN Supreme Court analyst and professor at the University of Texas School of Law, said other states could follow Ohio's lead.

"Today's decision could provide a road map to other states to follow Ohio's lead and to adopt aggressive rules for culling their voter rolls going forward, even with respect to folks who are still living in Ohio and legally eligible to vote," Vladeck said.

Dale Ho, director of Voting Rights Project at the American Civil Liberties Union, said the vast majority of other states find ways to make sure voter lists are up to date by using tax records, or returned mail or Department of Motor Vehicles change of address forms to determine whether someone may have moved.

The case came about when Larry Harmon challenged the process arguing that he was removed from the rolls even though he had not moved, but rather had opted not to vote in 2009 and 2010. When he showed up at the polls in 2015 he was told his registration had been canceled. He claimed no recollection of receiving a confirmation notice from the state and he later brought suit along with two public interest groups called the Northeast Ohio Coalition for the Homeless and the A. Philip Randolph Institute.

In September 2016, a federal appeals court ruled against Ohio, saying that 7,515 ballots that had been struck could be cast in the that fall's election. The state appealed, saying the process targets people who have failed to respond to a notice, not those who have failed to vote.

Alito emphasized the ruling was based on whether or not Ohio's process violated federal law, not if it was good policy or not.

"What matters for present purposes is not whether the Ohio Legislature overestimated the correlation between nonvoting and moving or whether it reached a wise policy judgment about when return cards should be sent," he wrote.

The Trump administration, reversing positions from the Obama administration, agreed with Ohio's interpretation of the federal law.

The "NVRA does not prohibit a state from using nonvoting" as the basis of sending an address-verification notice, administration lawyers argued in court briefs.