In this article, we argue that the size and cultural proximity of immigrant populations in people's residential surroundings shape national and European identities. This means that the type of migrant population activates cultural threat perceptions and opportunities for contact to varying degrees. Geocoded survey data from the Netherlands suggests that large non-Western immigrant shares are associated with more exclusive national identities, while mixed contexts with Western and non-Western populations show more inclusive identities. These results suggest that highly diverse areas with mixed immigrant populations hold a potential for more tolerance. In contrast, exclusive national identities become strongly pronounced under the presence of sizeable culturally distant immigrant groups.