HAMBURG, Germany — Most people can agree that international affairs should not be conducted by tweet — especially when the tweeter in question is Donald Trump. Among other reasons, it’s easy to dismiss the president’s mercurial rage and flagrant insults as little more than temper tantrums.

But that’s a mistake. Mr. Trump’s anger at America’s allies embodies, however unpleasantly, a not unreasonable point of view, and one that the rest of the world ignores at its peril: The global world order is unbalanced and inequitable. And unless something is done to correct it soon, it will collapse, with or without the president’s tweets.

While the West happily built the liberal order over the past 70 years, with Europe at its center, the Americans had the continent’s back. In turn, as it unravels, America feels this loss of balance the hardest — it has always spent the most money and manpower to keep the system working.

The Europeans have basically been free riders on the voyage, spending almost nothing on defense, and instead building vast social welfare systems at home and robust, well-protected export industries abroad. Rather than lash back at Mr. Trump, they would do better to ask how we got to this place, and how to get out.