In Switzerland an ideology of freedom had provided legitimacy for the self-assertion of a Confederation of autonomous cantons in defiance of the Holy Roman Empire since the sixteenth century; this sense of a separate national identity was cemented by resistance to Napoleon’s curbing of independence and the enforced conscription of young Swiss men for his armies.