These questions have bedeviled European leaders, and many Americans, as Mr. Trump has blithely alienated America’s friends and allies, canceled hard-won accords, dumped on trade treaties, threatened trade wars, lauded ruthless despots and cheered populist demagogues.

In the end, the “why” hardly matters. Trumpism, whatever its genesis, has been loosed upon the world, and the question is how those who believe in the value — and values — of the postwar order should respond. It has become evident that flattering Mr. Trump will get you nowhere. Swapping insults, as Donald Tusk, the president of the European Council, did in May — “With friends like that, who needs enemies?” — may be satisfying, but no more than that.

Europe’s response to Mr. Trump must begin with a hard look at realities. Europe is badly splintered, North vs. South, East vs. West, by economic crises, mass migration, the rise of populism and a widespread skepticism, most notably expressed by Brexit, about the benefits of a united Europe. Hostility to Mr. Trump will not be enough to unite the Europeans anytime soon on issues such as eurozone reforms, trade or asylum, especially as he is held on high by much of the European far right.

Mr. Trump is right, moreover, to charge, as have his predecessors, that Europe is not paying its fair share for Western security. Spending by NATO members has improved, and today only the United States and seven other members spend at least 2 percent of their gross domestic product — the NATO guideline — on defense, according to new administration data. That has to improve even more, not only out of fairness, but also if Europe wants to remain relevant in world affairs.

But the Europeans and members of the broader Western community can and must hold firm against Mr. Trump’s bullying. The United States is not as dominant as Mr. Trump wants to believe: The European Union, Canada and Asian countries are already responding to Mr. Trump’s protectionism with separate multilateral trade deals, and they should do what they can to impress on American industry the huge cost of a full-blown trade war. Signatories to the Paris climate accord and to the Iran nuclear deal must likewise keep these pacts alive even without the United States.