It is a variant of nationalism that has race as an excuse, for maintaining the ethnic purity of the nation, or for preventing the entry of foreigners, or by any other variant. See ethnicity .