Alongside a range of already well documented factors such as deindustrialization, technological progress and international trade, a series of recent empirical econometric studies show that immigration has contributed to the rise of extreme right-wing parties in Europe. Our study highlights, however, that there is no mechanical link between the rise of immigration and that of extreme right-wing parties. Exploiting French presidential elections from 1988 to 2017, we show that the positive impact of immigration on votes for extreme right-wing parties is driven by low-skilled immigration and immigration from non-European countries. Our results moreover show that high-skilled immigration from non-European countries has a negative impact on extreme right-wing parties. These findings suggest that the degree of economic and social integration of immigrants plays an important role in the formation of anti-immigrant sentiment. Fostering integration should therefore reduce negative attitudes toward immigrants and preserve national cohesion at a time when the economic consequences of the Covid-19 pandemic could reinforce mistrust and xenophobia.