Juliane Willuhn, the center’s director, said the crime remained unsolved. No one was injured in the blaze, but the attack seemed designed to threaten: Investigators concluded the fire was set intentionally, in a room containing baby strollers. Nothing was left of them except ashes and a few charred wheels.

And yet several Buch residents who lived near the center, in interviews, expressed optimism about their refugee neighbors. They hinted at the flip side of theories like the halo effect: that contact with people who are different eases the fears that can drive populist backlashes.

Martin Orthman was walking his dog, Sunny, in the park near the refugee center. Mr. Orthman said that he had developed a positive view of refugees after becoming a security guard in a refugee center in a neighboring town.

Across the street, Elena Salow, who lives a few blocks over from the refugee center, was walking home with her young daughter. She said she didn’t have any “direct feelings” about the asylum center or Alternative for Germany, but that she had had good experiences with the refugees.

“Sometimes we meet on the playground and the children play together,” Ms. Salow said.

These interviews pointed toward something called intergroup contact theory. When people have direct contact with members of a particular ethnic or national group, studies find, they tend to become more tolerant of the group as a whole.

This suggests that regular contact with immigrants reduces support for right-wing populist parties by removing the sense of fear that fuels them.

If true, that hints that Alternative for Germany’s hold in Buch might be weaker than their recent electoral successes would imply. But that kind of contact is slow to take effect, while the party has already enjoyed a meteoric rise.

Far-right support may eventually diminish. But in the meantime it will leave Germany’s migrants, and European politics, under tremendous stress.