TURNING OUT in record numbers last week, voters managed to disappoint both parties. Republicans lost the White House after only one term, but Democrats lost ground in the House and will be in the minority, or clinging to the narrowest possible majority, in the Senate. The result is a divided government that could yield two years of gridlock and frustration.

But gridlock is not inevitable. President-elect Joe Biden, House Speaker Nancy Pelosi (D-Calif.) and Senate Majority Leader Mitch McConnell (R-Ky.), along with their teams, have a chance to turn division into opportunity. There’s a lot they could do together in the national interest.

Start with Mr. Biden. He ran for office on a promise to unite a fractured nation, to be the president of everyone who voted for him and everyone who voted against him. That commitment, which we believe to be entirely sincere, now more than ever coincides with political necessity. He could quickly introduce an infrastructure bill, for example, that would help make the nation more competitive with China — a bipartisan imperative — while reaching out to voters who favored Mr. Trump (with rural broadband, for example).

This is not to say that he should trim his sails. Mr. Biden and Vice President-elect Kamala D. Harris will take office with a solid mandate: more votes than any ticket in history, a sizable margin of victory, strength in every region. Unlike Mr. Trump, Mr. Biden ran with a clear, explicit agenda on climate change, economic and racial justice, immigration and more. He’s not only entitled to pursue those objectives; he owes it to the nation to do so.

It follows that Mr. McConnell and the Republican caucus, whether in the majority or narrowly in the minority, should be prepared to meet Mr. Biden constructively. Some of them understand the climate emergency; they could use their leverage to promote market-based solutions that their backers in the business world favor — a predictably rising price on carbon, first and foremost. Some of them understand the nation is stronger when it welcomes talented and entrepreneurial foreigners. Many support the international alliances that Mr. Biden values and Mr. Trump demeaned. Almost everyone should understand the need for urgent action to contain the pandemic and repair the economic damage it has caused.

Of course, there’s a lot that Mr. Biden can do and should be prepared to do unilaterally — and without following Mr. Trump down a road of constitutional insult. He can protect the “dreamers,” those productive and patriotic immigrants who were brought here as children and whom Mr. Trump would have cast back to homelands they hardly remember. He can restore the United States as a beacon for refugees. He can reverse disastrous legal stances on Obamacare, the census and more. By executive order, he can undo some of the damage to the environment and civil rights that Mr. Trump, by executive order, inflicted.

But divided government shouldn’t mean that unilateral action becomes the chief arena for progress. The greatest harm Mr. Trump has inflicted over the past four years has been to the reputation of democracy itself. At home, further paralysis would only increase cynicism and fuel a return of Trumpism or something worse. Abroad, it would strengthen China’s argument that authoritarianism works better. Mr. Biden, Ms. Pelosi and Mr. McConnell are all skilled legislators and negotiators. They should put those skills to work for the betterment of the nation.

Read more: