I use evolutionary game theory to address the relation between nationalism and immigration, studying how two different populations in a country, one composed of national citizens and the other of immigrants, evolve over time. Both populations depart from some polymorphic initial state. A national citizen may behave either nationalistically or may welcome immigrants. Immigrants may have an interest in learning the host country language or not. I also account for the presence of enclaves, which make the immigrants’ own population effects important. The results show that six types of evolutionary equilibria are possible, although they never co-exist in the state space. A low cost of learning the host country language leads to complete assimila...