(Sarah Parnass/The Washington Post)

Joseph S. Nye Jr. is University Distinguished Service Professor at Harvard University and former dean of Harvard’s Kennedy School of Government. He is the author of “Is the American Century Over?”

The president got off to a rough start in his first 100 days, but he learned from his first crisis and might have had a successful foreign policy if he had lasted four years. That, of course, was John F. Kennedy with the Bay of Pigs, who later managed to launch arms-control negotiations with the Soviets. Presidents can learn on the job.

The most notable takeaway from President Trump’s first 100 days of foreign policy is how much he learned. During the 2016 campaign, he stunned allies by questioning America’s alliance structure, and days before taking office, he dismissed NATO as “obsolete.” Yet 82 days into his presidency, he told NATO’s secretary general that “NATO is no longer obsolete.” NATO did not change; Trump’s policies did — especially his harsh tone on China and his undue praise for Vladimir Putin.

(Adriana Usero/The Washington Post)

Given those shifts, it’s reasonable to guess that Trump’s role in history will not be to preside over the end of the liberal world order, as many have feared. Still, it’s not clear he fully understands what it will take to preserve U.S. leadership in the modern world.

In the 19th century, the United States was a minor player in world politics. In 1917, Woodrow Wilson led the United States into World War I, but the Senate would later reject his League of Nations. After the troops came home, the United States became virulently isolationist in the 1930s, becoming the world’s most powerful democracy but refusing to lead in producing order. The result was a disastrous decade of economic depression, genocide and world war.

World War II was the wake-up call. Harry Truman’s post-war decisions created permanent alliances with a military presence abroad. When Britain was too weak to support Greece and Turkey in 1947, the United States took its place. We invested heavily in the Marshall Plan in 1948, helped to create NATO in 1949 and led a U.N. coalition that fought in Korea in 1950. In 1960, we signed a security treaty with Japan.

Americans have had bitter debates over major mistakes such as intervention in Vietnam and Iraq, but the bedrock consensus in U.S. foreign policy for seven decades has been our alliance system. Not until 2016 had a major presidential candidate called that into question. Fortunately, Trump has stopped questioning U.S. alliances, but the rise of populism at home still poses a great danger to the American centrality of the global balance of power.

The real problem the United States confronts is not that it will be overtaken by China or another contender, but that it will face a rise in the power resources of many others — both states and nonstate actors. Our problem will be entropy — the inability to get work done. We will face an increasing number of new transnational issues that will require as much power with others as it does power over others.

This is a world that requires networks, institutions and the soft power of attraction. In a world of growing complexity, the most connected states are the most powerful. The United States comes first in terms of the number of embassies, consulates and missions abroad. Washington has some 60 treaty allies whereas China has only a few. In political alignments, the Economist estimates that of the 150 largest countries in the world, nearly 100 lean toward the United States while 21 lean against it.

These networks are important assets for generating the soft power necessary to organize states in response to new transnational threats such as terrorism, financial instability and climate change. Unfortunately, Trump still does not seem to understand the importance of soft power. His budget director proudly announced what he called a “hard-power budget,” and Trump wants to cut funding for the State Department and the United Nations.

The wise men of the 1940s created international institutions as well as alliances. They understood that smart power requires the combination of hard- and soft-power resources. President Franklin D. Roosevelt worked to establish the United Nations as a framework regarding the use of force and the Bretton Woods economic institutions that led to unprecedented prosperity.

The system the United States created has been called a liberal international order, because openness produces public goods available to all. But the label is confusing because it covers political-military affairs, economic relations, ecological relations and even promotion of liberal values. It remains to be seen to what degree these different aspects depend on each other and what the result will be if Trump unpacks the post-1945 package.

Fortunately, after 100 days, the military aspect looks more robust than Trump’s early rhetoric suggested. But the same cannot be said about the international economic system or the governance of global commons. If we want any hope of preserving American leadership, Trump will have to do a lot more learning in the months to come.