BERLIN — As allies across Europe and Asia adjust to changes brought by President Trump, Germany is in a uniquely difficult position.

Its economy and national security are particularly reliant on American support, which now seems in doubt, and on European unity, which is under attack and increasingly up to Germany to maintain.

Yet Germany is constrained by the growing shakiness of allies like Britain and perhaps even France, by the rise of its own far-right populist movement and by lingering cultural sensitivities about any policy that feels militaristic or hegemonic. These dynamics are not new, but there is a growing tension between the role Germany feels comfortable with, and the one it feels it needs to play on the world stage.

A growing number of officials in Germany are asking whether they need a Plan B for a post-American Europe. But they are finding that any such plan would require costs and sacrifices almost as great as the consequences of inaction.