The administration of the 2020 election wasn’t the calamity some had feared. Warnings of armed violence and voter intimidation came to nothing. Polling sites were sufficiently staffed, the system coped with the COVID-related surge in mail-in ballots, and Election Day lines remained manageable even in historically underserved areas.

With few exceptions, voting equipment functioned properly. In the most encouraging sign of the electorate’s resilience, turnout is expected to exceed 66% of eligible voters, the highest in more than a century.

Those achievements are certainly worth celebrating. Nonetheless, the protracted delays in releasing final tallies in contested battlegrounds are no mere inconvenience. At a time of heightened mistrust, they risk inflaming passions needlessly.

In 2020, they’ve given the losing candidate an opening to claim he didn’t lose. Systems that are unimpeachably prompt and accurate are needed to maintain public confidence. Leaders of both parties have a mutual interest in improving them.

This year, mail-in voting posed the main challenge. Due to the pandemic, the number of Americans who voted by mail nearly doubled over 2016, to almost half of all ballots cast. This greater volume raised concerns that millions of votes might go uncounted, due to higher rates of voter error and likely delivery problems in the United States Postal Service.

As it turned out, the share of ballots disqualified due to voter error was lower than expected. Planned staffing cuts at the USPS would have jeopardized on-time delivery of ballots, but these were abandoned thanks to congressional scrutiny. At least 150,000 completed mail-in ballots arrived after Election Day, too late to be counted in some states. That’s disappointing, but it could have been worse.

The capacity to sort and process these votes, however, wasn’t always adequate. Vote counts were unduly prolonged in states such as Pennsylvania. The most straightforward remedy would be for states to let election officials begin counting mail-in and early votes before Election Day.

Having tried the alternatives this time, more voters will want to avoid voting lines in future. States should set clear and realistic deadlines for returning absentee ballots, provide more ballot drop boxes, and put them where they can be easily found. They should use more high-speed scanners to sort ballots. And wider adoption of electronic poll books, currently used in one-quarter of jurisdictions, would cut waiting times, speed counting and reduce the potential for fraud.

In the past, Republicans in Congress and some statehouses have resisted such steps, fearing that making it easier to vote would hurt the GOP. This year’s election suggests that fear is misplaced. Amid historic turnout, the party made gains in the House and outperformed expectations in the Senate.

Sustaining voter enthusiasm and confidence in the voting process is critical to both parties’ future prospects — and to the vitality of American democracy.