As of Monday, the serial Greek bailouts are over. The country’s economic and political problems, however, are not.

But relative to what could have happened if Greece had defaulted on its obligations and departed the eurozone, the outcome, however uneven, has been a success. And the episode offers lessons on the importance of international institutions, as well as the perils of our own unchecked debt.

The European Union and the International Monetary Fund were the two main entities that kept Athens from the abyss. The E.U. in particular has been widely derided by populists throughout the continent and by President Donald Trump, who has broken a bipartisan presidential consensus on supporting the union. This, despite the political confederation presiding over a peaceful era after two devastating world wars that killed tens of millions, including hundreds of thousands of Americans. And the E.U. has responded not only to Greece’s spiraling crises that coincided with the global financial crisis and the Great Recession, but also to other shaky continental economies.

The end of the bailouts is “a meaningful marker and a recognition of quite a number of difficult reforms the government has undertaken,” Bart Oosterveld, director of the Global Business and Economics Program at the Atlantic Council, told an editorial writer. But, Oosterveld added, “meaningful challenges remain and the country is not out of the woods.”

Indeed. And the tough medicine of imposed austerity measures like big tax hikes and dramatically reduced government spending have made life extraordinarily difficult for many, if not most, Greeks. Well, at least those who stayed. Thousands of highly educated and employable Greeks emigrated for economic reasons. And beyond that attrition, a paltry birthrate that is likely a direct reflection of years of tough times makes demography one of many long-term questions unanswered by the emergency response.

Still, being left alone without the help of international institutions would have made matters worse economically and might have exacerbated extremist politics like the rise of Golden Dawn, a neo-fascist party that now has a presence in Parliament.

So instead of criticizing the international entities designed to restore order to a chaotic world, reckless European populists — as well as Trump — should appreciate and seek to strengthen entities like the E.U.

Trump and Congress should also get serious about America’s looming debt crisis. The national debt could rise to 150 percent of gross domestic product by 2047, according to the nonpartisan Congressional Budget Office. Interest payments alone could quadruple over the same time, crowding out other necessary spending. It’s an outlook that the nonpartisan Peter G. Peterson Foundation calls “unsustainable,” and it could lead to “sharp, sudden reductions” in expenditures to protect the most vulnerable.

The U.S. isn’t Greece — yet. But it must get its own house in order and support those institutions designed to stabilize nations in crisis.