That is one reason nationalist populism thrives more openly in the former East. The other is that easterners have been rebelling against a western narrative that has disempowered them.

Dr. Maaz, like many of his patients, now identifies as East German, something he never did under Communism.

The West, he said, had misunderstood 1989. It had overlooked the role national identity played in the East’s peaceful revolution against Soviet rule.

“We marched, we defeated communism, but it all became a victory of the West,” he said.

“We were never given the power to tell our version of the story,” he added. “You can’t even say that you had a happy childhood without breaking a taboo.”

That eats away at people, he said.

The bitterness is all the greater as easterners were complicit in their own subjugation, he said. “The western prejudice was: We are better. The eastern prejudice was: We are not as good,” he said. “Now easterners are saying: We are different.”

The far-right Alternative for Germany has successfully tapped into that feeling, styling itself as an eastern identity party and fueling resentments — not least toward migrants, who they say threaten German identity.

More than nine in 10 migrants live in the former West. But it is in the former East that antimigrant sentiment is strongest. Dr. Maaz says that has less to do with immigration than mass emigration in the years following 1989.