Larger inflows of immigrants, mainly caused by the lack of domestic labor, in the last few years have become an integral part of social processes not only in Western, but also in Central and Eastern Europe. Different attitudes towards immigrants in domicile populations are mostly explained using the theory of cultural defense, economic deprivation and security concerns. This paper discusses the connection between religion and religiosity and attitudes about migration and migrants, which is extremely contextually colored and differs from country to country, the connection ranging from positive to the negative ones. In the empirical part of the paper, based on a field survey data collected from a sample of the general population of the Republic of Croatia within the research project Transformation of local communities in the Republic of Croatia. Global challenges and development potentials, an attempt is made to determine how various dimensions of religiosity are related to attitudes towards migrants and possible explanations/mediating mechanisms for this connection. The theory of cultural defense, i.e. the role of religion as an identity marker related to ethnicity, culture and the perceived identity of local communities, is tested in particular in order to determine its validity in comparison with other theories. The robustness of the conclusions will be further confirmed by comparing attitudes towards different categories of migrants (asylum seekers versus labor migrants).