1690s, "separate existence as a nation, national unity and integrity," from national + -ity (in some usages perhaps from French nationalité. As "fact of belonging to or being a citizen of a particular state," from 1828, gradually shading into "race, ethnicity." Meaning "a racial or ethnic group" is by 1832. Related: Nationalities.
But I do love a country that loves itself. I love a country that insists on its own nationality which is the same thing as a person's insisting on his own personality. [Robert Frost, letter, April 21, 1919]