Right-wing violence is on the rise across many countries, for example, in response to the arrival of more than one million refugees to Germany in 2015-16. However, little is known about how that violence affects public attitudes. We assessed the effect of violent attacks on popular attitudes towards the presence of refugees in 145 German municipalities (3,240 respondents) by means of a segmented regression. Protests that happened prior to the survey led to an improvement in attitudes, while protests that happened afterwards were predicted by negative attitudes. The effect was independent of intergroup contact and political orientation. Thus, political violence does not merely reduce support for the perpetrators but can effectively undermine support for the attitudes they are advocating.