This paper examines how components of national identity are related to anti-immigrant attitudes in European countries at the individual level. The research literature on anti-immigrant attitudes was divided into material and symbolic explanations of group threats perception. In the formation of perceived material threats the role of subjective socio-economic status, professional qualification and education, and labor market protection was considered. Within the framework of the symbolic threat theory, national identity was presented, which was conceptually analyzed through the civic-ethnic dichotomy and by the comparative criterion of national pride. Based on the theoretical framework, hypotheses were put forward and tested on three waves of survey data from 20 European countries (total sample size N=30746) of the International Social Studies Program (ISSP 1995-2003-2013). Multi-group confirmatory factor analysis was performed to construct predictors, resulting in the identification of four national identity components. The dependent variable “anti-immigrant attitudes” was constructed in the same way. The main method of analysis was multi-group structural equation modeling. In all three waves, political patriotism, economic security and respondents' education level were negatively related to anti-immigrant attitudes. Ethnic and blind nationalism showed a positive correlation with the target variable. Cultural patriotism showed a positive correlation with the dependent variable for 1995 and 2003 and statistical insignificance for 2013. Metric invariance was established, indicating intergroup validity of the results over time. National identity components showed greater explanatory potential compared to respondents' socio-economic characteristics, providing evidence in support of the symbolic threat theory.