Wisconsin held its election Tuesday on schedule despite coronavirus, and Democrats are blaming the U.S. Supreme Court for endangering public health. That’s not what happened.

On Monday night the justices rightly reversed a district judge’s last-minute order that would have allowed Wisconsin ballots to be cast after the election was legally over. The confusing episode is a reminder that, even in a pandemic, steps as grave as rewriting voting rules should be up to elected representatives and not freelanced by judges.

Wisconsin planned to mitigate the coronavirus threat with a large increase in vote-by-mail so fewer people would need to leave their homes. The Democratic National Committee sued to force the delay of the election outright.

Last Thursday a federal judge denied that extreme request but said vote-by-mail needed to be extended. Instead of receiving ballots by April 7, he said, clerks needed to count any ballots received by April 13. After apparently realizing that this could distort the electoral process by allowing Tuesday’s reported results to influence votes, the judge issued another order banning the state elections board from reporting any results before April 13.

The Republican National Committee asked the U.S. Supreme Court to intervene, and five justices agreed that the district judge was outside his authority. His remedy would “fundamentally alter the nature of the election by allowing voting for six additional days after the election,” they wrote in an unsigned opinion. By trying to muzzle election results, they added, “the District Court in essence enjoined non-parties to this lawsuit.”

The Supreme Court decision came an hour after the Wisconsin Supreme Court swatted aside Gov. Tony Evers’s effort to unilaterally postpone the election. Through March, Evers, a Democrat, had indicated the election should proceed and issued an executive order exempting polling places from his mass-gathering ban.

Yet liberal pressure built in recent days and on Monday Evers tried using his emergency powers to call off the next day’s voting. The state’s Supreme Court ruled 4-2 that he didn’t have that power — election law would need to be changed by the legislature (though in other states governors’ emergency powers are broader). And so voting went ahead, with long lines at socially distanced polling places and a surge in absentee ballots — more than a million compared to less than a quarter million in 2016.

More than a dozen states have postponed their spring primary elections because of the virus. Yet Wisconsin’s election is more consequential. A state Supreme Court seat and criminal-justice referendum are both contested. Postponing it by months could require altering the duration of elected officials’ terms.

Republicans in the legislature didn’t show interest in postponing the election, but neither did Evers until recently. If voters are disappointed, they can hold legislators accountable in November or boot Evers in 2022.