Judging by a just-released poll from the Pew Research Center, U.S. President Donald Trump is heading to this week’s Group of 20 meeting in Germany with a resounding global vote of no confidence.

Only 22 percent of more than 40,000 respondents from 37 countries had confidence in Trump doing the right thing regarding world affairs; 64 percent felt that way about Barack Obama at the end of his presidency. The only countries preferring Trump were Israel and Russia.

Nine out of 10 countries posting the biggest drops in confidence were U.S. treaty allies. Respondents in seven of them — including NATO members Italy, Germany and Spain — put greater confidence in Russian President Vladimir Putin than in Trump.

So much for the assertion by Republican candidates on the 2016 presidential campaign trail that, under Obama, our friends no longer trusted us.

On the other hand, these poll results validate President America First. As Trump told a joint session of Congress, “My job is not to represent the world. My job is to represent the United States of America.”

Trump could argue that our allies are upset because the U.S. won’t play the global patsy anymore, giving them a free ride on defense, allowing them to practice unfair trade and saddling ourselves with treaty obligations that reduce our competitive advantage.

Winning a global popularity contest isn’t synonymous with defending U.S. national security and advancing U.S. economic interests. And it’s true that the Pew survey shows that the public in many of these countries don’t expect relations with the U.S. to change fundamentally under Trump, and that Americans in general remain well-liked.

But being seen as unreliable and “arrogant, intolerant and dangerous” — three qualities attributed to Trump by a thumping majority of all respondents — is more than a perception problem. It can have concrete policy consequences. If other leaders know that their publics dislike, distrust and disrespect Trump, they have more political incentive to thumb their nose at him and spurn U.S. demands and entreaties.

Consider recent developments with newly minted French President Emmanuel Macron, embattled British Prime Minister Theresa May and German Chancellor Angela Merkel, who is facing a potentially tough re-election campaign. Macron got domestic mileage out of snubbing Trump and giving him a man-grip handshake at last month’s NATO summit. Concern over public protests in the United Kingdom prompted Trump to postpone his planned visit there, and gives May good reason to keep her distance. Merkel — seen more favorably by Pew respondents than Putin, Chinese President Xi Jinping and Trump — was recently attacked by challenger Martin Schulz for not standing up to an “erratic” Trump, notwithstanding her earlier declaration that the era of reliable relations with the U.S. “are to some extent over.”

That erosion of goodwill and realignment of domestic political incentives among trans-Atlantic stalwarts may not blow up treaty alliances or shatter the postwar liberal international order. But it can spell the difference between compromise and conflict in trade and investment, regulatory cooperation and even security interests. A U.S. president reluctant to affirm the mutual defense commitment at the heart of the NATO charter may find himself getting a less receptive ear on troop requests for Afghanistan. Over-the-top bluster about raw deals on trade and investment can raise the political stakes in unrelated commercial and regulatory disputes.

Moreover, while the Pew results suggest that the U.S. global brand is resilient, it’s not indestructible. Favorable views of America are in decline, down from a global median of 64 percent in the final years of Obama to 49 percent in 2017. Respondents in 30 out of 37 countries had a less favorable view of the U.S.; the only countries to register a more favorable view were Hungary, Jordan, Nigeria, Greece, Vietnam and Russia, whose inhabitants gave Trump a big “Da” (up 26 points since Obama’s last years). That’s not great company to be keeping. Favorable views about U.S. democracy have also dropped, especially in Africa and Latin America — a troubling decline at a time when autocracies are on the march.

Opinion polls are a far cry from policies and actual results. Although previous Pew polls showed a dramatic rebound from the years of George W. Bush to those of Obama, all the world’s problems hardly went away, and many U.S. voters expressed reservations about Obama’s foreign policies. As the Middle East scholar Shadi Hamid archly asked at a Brookings Institution event on this year’s survey, “What is the relationship between people hating our president and the world falling apart?”

Hamid got a good laugh. Even with Trump in office, after all, the world is likely to hold together. But for those Americans who care about their nation’s hard-won place in it, the joke is likely to be on us.

James Gibney writes editorials on international affairs for Bloomberg View.

KEYWORDS Donald Trump