1690s, "national quality," 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 "separate existence as a nation" is recorded from 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]