It is widely believed that the recent recession has soured public attitudes towards immigration. But most existing studies are cross-sectional and can shed little light on the economy-wide forces that shift public opinion on immigration. In this paper I use the six rounds of the European Social Survey (2002-2012) to test the effects of macro-level shocks on immigration opinion for 20 countries. For Europe as a whole the shifts in opinion have been remarkably mild but with differences between countries that reflect the severity of the recession. Pro-immigration opinion is negatively related to the share of immigrants in the population and to the share of social benefits in GDP, but only weakly to unemployment. These effects are common across different socioeconomic groups and there is little evidence of divergence in opinion. The continuing rise in support for right wing populist parties during the recession owes more to growing Euro-scepticism than to a surge in anti-immigrant sentiment.