IN THE horrifying turmoil of the past week, Congress’s rejection of a Republican minority’s attempt to nullify the 2020 election results stands out as a bright moment for the rule of law and democracy. Though a relatively large number of GOP members in the House supported the bid, only eight of 50 Republicans present in the Senate did. And the broad bipartisan rejection came after a series of floor speeches that established an equally wide consensus: Congress has no authority to usurp the states’ prerogative to pick their own electors. That responsibility belongs to the states, through elections whose conformity with state law is the states’ alone to determine.

This is much more than a technical point, since the spurious effort to block the counting of Arizona’s and Pennsylvania’s electoral votes, spearheaded by Republican Sens. Ted Cruz (Tex.) and Josh Hawley (Mo.), rested on the premise that Congress may indeed second-guess state elections, even absent competing slates of purported electors or other live disputes as of the time certified electoral votes arrive in Washington. This contention, in turn, rested on an opportunistic reading of the admittedly ambiguous Electoral Count Act of 1887, which gives members of Congress the power to reject votes “not . . . regularly given.”

Now is the time for Congress to amend this statute to reflect the consensus expressed in the Senate week, a consensus that fortunately corresponds with the statute’s intent, however inartfully expressed. The purpose of the law was precisely to prevent any more improvised electoral commissions like the one used to settle the 1876-1877 Hayes-Tilden dispute. Yet Mr. Cruz and Mr. Hawley recklessly asserted the opposite, supposedly because they wanted to give charges of fraud another hearing, even though the allegations were patently absurd and already litigated. Their interpretation of the law would allow a future Congress controlled by one party to overturn the results of a presidential election by a simple majority vote, with the result that “our democracy would enter a death spiral,” as Republican Majority Leader Mitch McConnell (Ky.) put it this week.

The Electoral Count Act’s prolix text should promptly be changed to make crystal-clear that the states, not Congress, are the ultimate arbiters of their elections for presidential electors, and that their votes will be considered “regular” except for rare circumstance in which the Constitution or federal law may have been violated — by the election of an ineligible person, say, or by holding the election on an unauthorized date. Congress should also consider making the president pro tem of the Senate responsible for the vote count. This would eliminate, beyond any doubt, the scenario under which a vice president could purport to decide the votes’ validity himself.

Such changes, suggested first by constitutional scholar Michael J. Glennon of Tufts University in the wake of the 2000 Bush-Gore debacle, are long overdue. So, too, are a number of additional updates to the Electoral Count Act, suggested not only by Mr. Glennon but also by Ohio State election law expert Edward B. Foley and others, that could help eliminate opportunities for partisan mischief of the kind that destabilized the country on Jan. 6. A large bipartisan majority of Congress has refused an opportunity to usurp power the Constitution assigns to someone else, evidence of that majority’s civic responsibility. Now, they should write it into law.

Read more: