Germany’s unique role in history, as the birthplace of the Nazi Party and the ensuing atrocities that followed its rise to power in the 1930s, has meant that generations since the party’s defeat in World War II have been raised to reject its xenophobic thinking. The cultural memory of this Nazi violence shapes modern Germany’s view of itself and its role in the world.

Unlike in the United States, where far-right extremists are free to brandish the emblematic red flags emblazoned with the black swastika against a white circle, all Nazi symbols, including the stiff-armed “Hitler salute,” are banned in Germany and Austria. Anyone displaying them can be fined.

A 41-year-old American who gave the salute in a bar in Dresden on Saturday is under investigation for his actions, the police there said. The man, who was not identified in keeping with German privacy law, suffered light injuries in a scuffle that followed his gesture, the police said. His assailant could also face charges.

Despite having some of the world’s strictest laws to limit far-right expression, Germany has struggled for decades with domestic neo-Nazi groups. Last year saw nearly 22,000 attacks motivated by far-right sentiment, a 42 percent increase from 2015, according to the domestic intelligence agency. Many of those attacks targeted recently arrived refugees and their shelters or homes.

In London, a spokesman for Prime Minister Theresa May said the British government condemned “racism, hatred and violence” and singled out the far right for specific criticism. Her spokesman, James Slack, in a briefing to reporters, avoided any direct critique of President Trump, and said that the president’s comments were “a matter for” Mr. Trump alone.