There is a crucial distinction, however, between the status of specific contested mail-in ballots and voting by mail generally. Mr. Trump has been anything but clear about this distinction. When he calls on state authorities to “get rid of the ballots,” which ballots does he have in mind? The president’s lawyers have the right to contest the inclusion of specific ballots in the final count. But Mr. Trump is wrong to reject an entire category of ballots, and encouraging his supporters to doubt their legitimacy is irresponsible.

The consequences for social stability could be grave. Numerous surveys have shown that while most Republicans intend to vote in person, a majority of Democrats will vote by mail. The slower count of mail-in ballots means that the early returns may favor the president, while the later returns will move the balance in the other direction. Insisting that only the election-night results are legitimate, as the president and his press secretary have done, is a prescription for disaster. Voting by mail is not a Democratic “scam,” as Mr. Trump has put it. It is an essential part of the democratic process, never more than this year.

There are many steps that can be taken to protect the legitimacy of the 2020 elections. Americans should unite across party lines to support some simple principles: The tally of the vote should continue until every valid ballot has been counted. Courts should resolve disputes about voting rules without delay, preferably before the election. The status of contested ballots should be resolved through the due process of law. And slates of electors should be determined by the will of the people of each state, not the partisan whims of state legislatures.