The former vice president has more foreign policy experience than any other candidate. But his record isn’t all what you’d expect.

Joe Biden enters the 2020 campaign as the only Democratic candidate with any experience in making foreign policy, and that experience is immense: 36 years on the Senate Foreign Relations Committee (12 as chairman or ranking member), eight years as vice president, probably more knowledge of the full range of global issues than anyone else on the political scene. So what does this long record reveal about how he might behave as commander in chief?

It’s a mixed picture, as one might expect of someone who was born during World War II, grew up amid the rise of America’s global dominance, first ran for Senate during its disastrous comeuppance in Vietnam, then played an active, sometimes shifting role in the debates on subsequent interventions in Bosnia, Kosovo, Afghanistan, Iraq, and beyond.

Above all, and in starkest contrast to President Donald Trump, Biden has always been a champion of the alliances that he sees as the foundation of U.S. power and values— especially NATO but also with nations in Asia and the Western Hemisphere. He is also—contrary to Trump as well as some of his rivals in the upcoming primaries, notably Sen. Bernie Sanders—an unabashed free trader.

He entered the Senate, in 1973, as a foe of the Vietnam War, which had left him and many others skeptical of America’s ability to be the world’s policeman. As late as 1990, he voted against authorizing President George H.W. Bush to use military force against Iraq after its invasion of Kuwait.

But then in 1993, when President Bill Clinton initially declined to get involved in the sectarian wars in Bosnia, Biden made several trips to the region and came back fervently advocating a policy of “lift and strike”—lifting the arms embargo, so the Muslim could fight back against Serbian aggression, and mounting U.S. and NATO airstrikes against Serbian military positions. (Two years passed before Clinton adopted that policy.)

The Bosnian conflict shifted Biden’s thinking about the new wars of the post–Cold War era. He strongly supported President George W. Bush’s invasion of Afghanistan in response to the terrorist attacks of Sept. 11, 2001. After a combination of U.S. troops, airstrikes, and Afghan rebels ousted the Taliban from power, he proposed a full-blown “nation-building” campaign to fund 1,000 schools in the country. The idea won little support from either the administration or his colleagues in Congress.

When Bush diverted his gaze to Iraq, Biden voted in favor of a bill to authorize military force—but only after Bush assured him that he would use the bill as leverage to get a U.S. resolution placing weapons inspectors back in the country. After that, when Bush pushed further for war, Biden and the ranking Republican on the Senate Foreign Relations Committee, Sen. Richard Lugar, wrote a bill permitting the use of force only if the United Nations Security Council passed an additional resolution, attesting that force was the only way to remove the weapons (which, it turned out, didn’t exist). In a New Yorker article at the time, George Packer wrote that Biden and Lugar negotiated with White House lawyers on legislative language—but in the end, they were hoodwinked: Bush rammed through a bill for unconditional authority to go to war.

By 2006, as Iraq plunged into civil and sectarian war, and as turmoil returned to Afghanistan, Biden grew disenchanted with nation-building as a mission that exceeded America’s patience, resources, and interests—and he pushed for total military withdrawal from both countries.

In a 2006 New York Times op-ed co-authored with Leslie Gelb, a former State Department official and president of the Council on Foreign Relations, he proposed defusing the sectarian conflict in Iraq by turning the country into a federated state, with power devolved to the three regions where Sunnis, Shiites, and Kurds respectively held majorities. In theory, it was an elegant solution, but in practice it was a dead end mainly because no Iraqi leader remotely favored the idea.

When Biden became Barack Obama’s vice president in 2009, their first major challenge in foreign policy concerned Afghanistan. During the campaign, Obama had called for withdrawing from Iraq but digging deeper into Afghanistan. The question, hammered out in a series of 10 National Security Council meetings, was how deep.

It was here that Biden and Obama had their biggest disagreement. The majority on the NSC—including the Joint Chiefs of Staff, Secretary of State Hillary Clinton, and, after brief opposition, Secretary of Defense Robert Gates—proposed sending 40,000 more U.S. troops and adopting a full-fledged counterinsurgency strategy, including reform of the Afghan government: in effect, “nation-building.”

Biden was the main—almost the sole—advocate of a more minimal approach: sending just 10,000 more troops solely for counterterrorism operations and to train the Afghan army. The majority argued that Biden’s proposal wouldn’t solve the problem; Biden countered that their approach wouldn’t either—that it would cost too much, last too long, and go far beyond the mission that brought U.S. forces into Afghanistan to begin with.

Obama sided with the majority, but imposed an 18-month deadline to show progress. The chiefs assured him that they could get the job done; in fact, they knew that they couldn’t and figured that the president would give them more time, and maybe more troops, down the road. He didn’t. In the end, Obama withdrew the extra troops and adopted Biden’s approach.

Biden had other differences with Obama: more hawkish on some issues, less so on others. (In that sense, as well as many others, Trump is wrong in painting Biden as a mere Obama clone.) When Russia annexed Crimea and sent special forces into eastern Ukraine, Biden sided with advisers who wanted to ship Ukraine anti-tank missiles and other “lethal defensive weapons” (though he opposed sending heavier weapons, much less U.S. troops). He argued that, while the Ukrainians couldn’t win a battle with Russia, they could send some of the special forces home in body bags, a sight that might erode domestic support for Russian President Vladimir Putin and thus deter him from sending more troops. Obama, thinking that the Russians would only escalate a battle that he couldn’t win on the ground, decided not to ship lethal weapons but instead to send Ukraine economic aid and to organize international sanctions against Moscow.

The vice president also supported bombing Syria in 2013, after its president, Bashar al-Assad, used chemical weapons against his own people, thus crossing a “red line” that Obama had laid down. Obama delegated the decision to Congress, which declined to give him authority (and then criticized him afterward for not bombing).

On the other hand, Biden opposed intervening in Libya, against Obama, this time siding with Gates and the joint chiefs; Obama went with Clinton and national security adviser Susan Rice, who favored the move. It has been reported that Biden opposed the raid on Osama bin Laden’s compound in Pakistan, but this isn’t quite so. At the NSC meeting to discuss the options, he proposed delaying the decision, at some risk, in order to get better drone photos of the site since, at the time, U.S. intelligence agencies said there was only a 60 or 70 percent chance that the man sketchily seen at the compound was in fact bin Laden. In the end, as the two men went up to Obama’s residence after the meeting, Biden advised him to go with his gut.

In a 2014 speech at Harvard University’s John F. Kennedy School, when he was still vice president, Biden said that, in a world of dispersed power and new threats, the United States had “an obligation to lead.” Doing so was “costly” and “takes sacrifice” and may be “dangerous,” but “we must lead,” he said, otherwise someone else will—to the possible detriment of our values and interests—or nobody will, fomenting chaos, which will draw us in at some point anyway.

At heart, Biden seems to believe that, as he said in the speech, “it is within our power to make a better world.” This view, as history has shown, can inspire noble creations or arrogant destruction or both. But his idealism seems tinged with enough realism to avoid deep dives, especially massive troop deployments, which have led to disaster throughout his career. It has also made him skeptical of almost any sort of unilateral military adventures, seeing alliances as not only an expression of U.S. values and interests but also as a safety valve against excessive enthusiasm in the name of a cause.

Finally, like the Cold War traditionalists whom he has lionized since his youth, Biden sees domestic and foreign policies as intertwined. He has said many times, “We lead not only by the example of our power but by the power of our example.” In that sense, he has advocated better relations with Mexico alongside comprehensive immigration reform. He has argued that we can’t persuade others to adopt democracy if we’re falling short of its goals ourselves.

If Biden were elected president, he would make a high-profile effort, early on, to restore America’s image abroad in part by restoring its values at home. It’s less clear what might happen after that—whether the combination of his principles, his pragmatism, and the state of the world makes him more or less likely to start a war or make peace.