In considering Joe Biden’s foreign policy record, it’s hard to overlook the scathing critique delivered by Robert Gates, the Washington wise man and veteran of half a dozen administrations who served as President Barack Obama’s first defense secretary. While Biden was “a man of integrity” who was “impossible not to like,” Gates wrote in a 2014 memoir, “he has been wrong on nearly every major foreign policy and national security issue over the past four decades.”

Yikes. For those of us desperately hoping that President Trump’s romances with dictators and wanton destruction of U.S. global influence will soon be brought to an end, Gates’s verdict raises an awkward question: Would Biden not be better? Could he, in his own way, make it all worse?

The short answer is easy: Biden could and would quickly undo the distinctive evils of Trumpism. It wouldn’t be hard for him to call the leaders of Germany and South Korea on Day One and say we’re going back to being your reliable ally. It would be easy for him to say what Trump refuses to: that Vladimir Putin is guilty not just of orchestrating the murder of his domestic opponents but of U.S. troops — and should pay for it. With a couple of strokes of the pen, Biden could put the United States back into the Paris climate accord and the World Health Organization, and thus rejoin critical multilateral initiatives on climate change and the covid-19 ­pandemic.

But what of his judgment on big questions: Has he really made so many bad calls? Gates doesn’t spell out his case, but it’s not hard to compile one. Biden voted against the successful U.S. military campaign that expelled Saddam Hussein from Kuwait in 1991. In Iraq, he compiled a trifecta of blunders: He voted for the 2003 invasion; opposed the 2007 “surge” that rescued the mission from utter disaster; and oversaw the premature 2011 withdrawal of the last U.S. troops, which opened the way for the Islamic State.

Biden argued against Obama’s 2009 decision to surge U.S. troops in Afghanistan, proposing that the mission should instead limit itself to counterterrorism. But according to Gates, he raised his hand against the most important counter­terrorism operation of recent years, the 2011 special forces raid that killed Osama bin Laden. (Biden has said he later encouraged Obama to go ahead.)

That’s a pretty substantial list. To be sure, many of Biden’s Democratic colleagues made the same bad calls (and I, along with The Post’s Editorial Board, supported the Iraq invasion). But a new president won’t be able to afford more big errors. If voters oust Trump, the democratic world probably will grudgingly give U.S. leadership one more chance — but not for long if the new president fails to inspire confidence.

That brings us to the good news about Biden, which comes in three parts. First, his record was always stronger than Gates, a lifelong Republican, made out. Second, it looks better than it did when Gates delivered his assessment six years ago. Best of all, by all accounts the former vice president, unlike Trump, has learned from his mistakes.

Any account of Biden’s foreign policy has to include his role in pushing during the 1990s for stronger U.S. action in the Balkans, including support for the Muslim-majority entities of Bosnia and Kosovo against Serbian aggression. He eventually backed what were arguably the most successful U.S. military interventions of the past 30 years. Though they remain politically troubled, Bosnia and Kosovo have lived in peace for a quarter-century.

Biden’s advocacy on Afghanistan, too, has looked better with time. The troop surge that he opposed and Gates favored ultimately failed to stabilize the country. Today, the formula Biden proposed, a U.S mission dedicated to combating terrorism, would be a considerable improvement on the full pullout Trump has committed to. Biden’s opposition to Obama’s 2011 intervention in Libya also looks good in retrospect: While the bombing campaign saved lives at the time, it triggered a decade of chaos and gave al-Qaeda a new base.

Biden’s career encompasses the U.S. post-Cold War trajectory from confident sole superpower to a more chastened nation facing formidable challenges from China and other autocracies. Along the way, Biden has grown more cautious about the use of force; advisers say Afghanistan, in particular, taught him the limits of what U.S. interventions can accomplish.

Yet Biden still differs from Trump and the Democratic left in his willingness to support smaller-scale military missions, such as that which defeated the Islamic State in Syria. Unlike the current president, he hasn’t abandoned the notion of American leadership. He offers the promise of a U.S.-led coalition that stands up to China and Russia to secure democracy and human rights in the 21st century. If he wins and sticks to that, he won’t go far wrong.

Read more: