The U.S. Supreme Court on Tuesday repudiated the argument that the Constitution strips state courts of the power to review voting laws passed by state legislatures, taking that issue off the table in upcoming litigation over the 2024 elections.

The court’s 6-3 ruling in Moore v. Harper was hailed by voting rights advocates as a win for democracy that preserves the role of state judges in ferreting out discriminatory or otherwise unfair rules passed by state lawmakers. At the same time, Chief Justice John Roberts Jr.—writing for the majority—did acknowledge that state judges do not have “free reign” to rewrite election laws from scratch.