The emergence of nation states as the dominant organizational form of polities in the modern era was a momentous innovation with massive economic and welfare consequences for its citizens. A central aspect was the formation of a ``national identity’‘, where individuals increasingly aligned their behavior to what was considered the national standard. We use a new panel data-set on first names for 12 cities in Germany over the period 1800 to 1900 to trace changing parental preferences. Over the 19th century, family and religious traditions lost influence, while national first names became increasingly prominent. First names had strong behavioural consequences. We show that parliamentarians with national first names were much more likely to be members of conservative or nationalistic parties. Next, we compare first names for the universe of births with first names from loss lists from World War I for several German cities and show that people with national first names had a higher likelihood to fight (and die) in the wars of 1870/71 and World War I. We use within-family variation to test for causal effects of territorial changes on parental name choice.