How does terrorism affect attitudes towards out-groups? While research has found negative effects, these effects may be dependent on more factors than has been acknowledged so far. This thesis proposes a framework for understanding the consequences of terrorist attacks consisting of three parts; the terrorists’ group background, the framing of attacks and the public’s prior attitudes. Three empirical studies of surveys after attacks and of survey experiments explore this framework. The first investigates the reaction to the July 22, 2011 attacks in Norway and shows that the political response and people’s prior attitudes were central to the increase in out-group trust afterwards. The second studies the Charlie Hebdo and Hyper Cacher attacks in Paris in 2015, showing that while people in France did not increase their opposition to immigration, people outside France did. This is interpreted in light of the French response with its emphasis on republican values such as tolerance. The last paper explores how the terrorist threat affects for support for counterterrorism and shows that this support increases even for measures that target other groups than the ones creating the threat.