Yet the fear-mongering is creating a positive response. As the anti-immigrant faction picked up on these stories, German feminists rallied, demanding to know why violence against women in Germany gets so little attention unless it’s committed by a migrant. Rather than driving German feminists and refugees apart, a new avenue of conversation between them has opened.

Still, even as Mr. Trump is inadvertently bringing Germans together, there is something that troubles us. Germany has always been strongly pro-American — not always on policy, but in celebrating the sense that America is our most stable trans-Atlantic partner. In the last year, and especially over the last few weeks, we seem to have lost that alliance.

Germans have not always liked what America did in the world, but we deeply admired it for a postwar strategy that helped Germany become what it is today. Most Germans have stories like those my American studies professors would tell us at university. These stories all go back to a moment when they were children and met a G.I., often soon after the war, who introduced them to music they had never listened to before, gave them sweets they had never tried or simply behaved toward them in a way the soldiers of the Nazi regime never had.

Yes, they might be the nostalgic, infantile memories of a postwar child. But they also fit our self-conception. For decades after the war, Germans were democrats-in-training; we had to learn the rule of law and the values of liberalism. Democracy was nothing this country ever fought for. Instead, we learned it from America.

There has always been ambiguity about American leadership — one should not forget George W. Bush and his Axis of Evil — but it always felt safer than turning one’s head toward Russia or China. For the first time Germans cannot be sure of this. We don’t know where the United States is leading the world.

The anti-Trump dynamic is at work at home, too. A few weeks ago Horst Seehofer, the head of the Christian Social Union, hinted that he might pull his party out of Ms. Merkel’s coalition government, where he is the interior minister, unless she agreed to sharp limits on immigration. It was a trumpian move, designed to counter inroads made in the party’s home base of Bavaria by the far-right Alternative for Germany (known by its German initials AfD).