President Trump shakes hands with German Chancellor Angela Merkel earlier this month at the Arc de Triomphe in Paris. (Ludovic Marin/Pool/EPA-EFE).

BERLIN — Sometimes, even in the best of relationships, perceptions fail to align: One side senses that all is going swimmingly. The other is miserable.

So it is, apparently, with the United States and Germany.

Ask the average American, and the German-U. S. partnership is hale and hearty. The average German has the opposite view, seeing a friendship gone sour.

Those were the findings of a joint survey conducted by the U. S-based Pew Research Center and Germany’s Körber Foundation. The results were released overnight Monday, and presented Tuesday at a foreign policy forum in Berlin.

The findings show anew just how alienated Germans have become in the age of Trump from their traditionally closest overseas partner. The U.S. president is spectacularly unpopular in Germany, Europe’s largest economy and political heavyweight, as numerous surveys have shown.

But the latest findings suggest German dissatisfaction with the United States runs even deeper than it did earlier in Trump’s presidency, with a profound effect on German views of the relationship at a time when trade, defense spending, energy and Middle East policy are all causing friction.

Germans and Americans “are divided not only on the overall state of the relationship, but also on future levels of cooperation, the importance they ascribe to each other on foreign policy and the efficacy of retaliatory tariffs,” Pew’s Jacob Poushter and Alexandra Castillo write.

Seven out of 10 Americans say the U.S. relationship with Germany is in good shape, with only a quarter saying it’s bad, the study found. German results were the mirror opposite: Nearly three-quarters say the relationship is bad, while less than a quarter say it’s good.

Among Germans, views have sharply deteriorated from last year, when just over half of survey-takers said the relationship was in bad shape.

Since then, Trump has escalated his criticisms of Germany, which has become a favored target on Twitter.

The U.S. president frequently lashes out at Germany for not spending more on defense and has threatened to slap tariffs on Germany’s beloved automotive sector. He’s also warned of sanctions against German companies involved in the construction of a Russian gas pipeline while canceling U.S. participation in an Iranian nuclear deal that German officials see as critical to global peace.

An earlier Pew survey showed that just 10 percent of Germans had faith in Trump to do the right thing in world affairs. The latest findings deepen the picture of disaffection.

Fewer than half of Germans want more cooperation with the United States. Meanwhile, more than half want stronger ties with China and Russia, two traditional adversaries.

Nearly three-quarters of Germans want their country to be more independent of the United States, compared to only 3 in 10 Americans who say the same about Germany.

That desire among Germans for greater autonomy from the nation that has long been the guarantor of European security was echoed Tuesday by German Foreign Minister Heiko Maas, who called in a speech in Berlin for Europe to step up as U.S. engagement on the continent diminishes.

“Either we succeed in strengthening a united Europe, or, and this isn’t an exaggeration, we risk the future of this singular project of peace,” Maas said in a speech at the Berlin Foreign Policy Forum.

The U.S. role in Europe, he argued, had been declining even before Trump took office. The European response should be to “invest more,” to “compensate and rebalance.”

Amid Trump’s hectoring, Germany has modestly increased its defense spending in recent years but is still nowhere near the NATO target of 2 percent of gross domestic product. Fewer than half of Germans want the military’s budget to rise further.

One area where Americans and Germans agree is on NATO: Nearly two-thirds in both countries have favorable views of the alliance.

The Pew-Körber survey was based on a telephone survey in September of 1,006 Americans and 1,002 Germans.

Luisa Beck contributed to this report.