With Donald Trump as president, analysis and commentary is often chasing headlines. Whether it is his decision to disinvite the Philadelphia Eagles to the White House, his declaration that he is the law when it comes to the Mueller investigation or the tirade against Canada, it’s hard to avoid head-scratching and headaches while reading the news. Some of this is noise, created by the president to distract his foes, divert popular attention and drum up support. Other presidential pronouncements have important and immediate policy consequences. But whoever takes his place, whether in 2021 or 2025, will have to manage the fallout from all this chaos and fix his many mistakes.

Some repairs, while extensive, may still be easy. Even if Trump’s successor favors a more traditional foreign policy, however, he or she cannot simply sweep the Trump administration under a rug and resume the previous course. The United States has lost influence with allies and is squandering much of its “soft power” in ways that will make it difficult to regain.

One of the biggest challenges, and one discussed in detail by my Brookings colleague Thomas Wright and other experts, is Trump’s retreat from the world order the United States created and championed after World War II—a retreat also seen in the United Kingdom, Italy and other parts of the world. One can point to many fits and starts, but in general both Republican and Democratic administrations advanced free trade, U.S.-led alliances and international institutions, while Trump has scorned all three.

A successor to Trump can try to renew these commitments but must do so with the world recognizing that a sizeable share of Americans oppose these traditional components of the world order and that a leader championing these Americans might again gain power. In addition, Trump’s withdrawal from the Iran deal after years of painstaking negotiations shows that the United States will not necessarily honor its commitments: It is an administration that is making a deal apparently. The shadow of the future is far grimmer, as a commitment that binds one administration may no longer bind its successors.

Some parts of the world are wrestling with a longer-term retreat of American power. Europe and the Middle East began this process under President Obama, who was not eager for the United States to play a heavy role in shaping these regions. The bottom for U.S. influence fell out under Trump, who has repeatedly scorned the NATO alliance and blasted European allies as feckless freeloaders who owe the United States “massive amounts of money” for their defense. A Politbarometer poll taken in May found that only 14 percent of Germans consider America a reliable partner: Russia scored 36 percent and China 43 percent. Given Russia’s aggressiveness, however, a future U.S. leader may want to reverse course and at least some European states might look for help, but allies will rightly question whether the United States will be by their side and stay there.

And as the next administration wrestles with a more skeptical world, it will have to do so with a hollowed-out diplomatic corps. Congress has long viewed State Department budget requests with skepticism, and under Secretary of State Rex Tillerson the Trump administration sought massive budget cuts while purging veteran diplomats and freezing hiring. His successor, Mike Pompeo, has pledged to end the orgy of institutional destruction and, commendably, has taken several steps to do so. But institutions cannot be rebuilt overnight. The talent loss has been severe, and the chaos in the White House is scaring away competent professionals. Some diplomats worry about the abandonment of any human rights agenda and the shift in power from State to the Pentagon.

The United States is also losing much of its soft power. Part of this stems from the abandonment of cherished ideals that, whatever America’s inconsistency over the years, still had the power to inspire. Trump has scorned the idea of the United States as a haven for those fleeing persecution, perhaps America’s longest legacy. He has highlighted and exacerbated intolerance, complaining about people from “shithole” countries, building a wall to deal with a nonexistent surge in migration from Mexico and playing up anti-Muslim sentiment. The Trump administration is even separating children from their families at the border. This ugly side of America preceded Trump and will endure after he leaves office, but in the past, U.S. leaders have downplayed, not exacerbated, these sentiments. Trump’s words and actions seem to confirm what some anti-American voices have long claimed: that the United States is racist and intolerant.

Such judgments based on Trump’s rhetoric may grow as fewer international students get to know the United States by studying at its universities. American universities are the best in the world, and as foreign nationals who studied in the United States rise through the ranks of government and industry, some have assimilated U.S. values, and many are comfortable working with Americans. But the number of international students fell 7 percent in the fall of 2017, and this decline is likely to continue as visa restrictions and this administration’s hostility to foreigners make America less attractive. Over time, this will diminish the number of high-quality students who want to stay and work in America, reducing an important source of innovation and skilled labor. It also reduces the number of foreigners who go home with an understanding, and appreciation, of America and its traditional values. European countries with more open educational policies will enjoy the advantages America once held. And the caliber of foreign universities will improve as these top-quality students choose to study there, and U.S. institutions will decline.

Trump has dug America into a hole, and the next administration will spend much of its time trying to get out. None of Trump’s changes are irreversible, but they are hard to reverse. It took generations for presidents of both parties to build up these advantages. Although they have been quickly squandered, they cannot quickly be restored. The next administration should focus not only on rectifying Trump’s day-to-day blunders but also on how to restore institutions, soft power, the credibility of American values overseas and the deeper sources of U.S. power.