The Swiss have long prided themselves on their army, which requires part-time service from each male citizen between the ages of 18 to 34. Women may serve voluntarily.

In a nation of eight million people, about 20,000 soldiers a year attend basic training for 18 to 21 weeks, then keep their uniforms and weapons at home to be ready for rapid mobilization and tours of duty.

But left-wing and humanitarian critics have said that the military is too costly and that the end of the cold war eliminated the need for large-scale forces with fighter planes, tanks and artillery. Even though Switzerland maintained armed neutrality during World War I and World War II, many Swiss believe their military — including mandatory service — is a strong deterrent that has kept the small nation out of Europe’s wars.

In recent decades, scholars have questioned the widely held belief that the military, with an elaborate complex of underground Alpine bunkers, deterred a Nazi invasion, arguing that Hitler left the neutral Swiss alone because he wanted to use its banks and other services that would have been cut had he invaded.

The Swiss government had urged voters to retain the conscription service, counter to what most Western European nations have done since the cold war. Changes in the military have reduced the army’s reserve of troops to 155,000, from about 625,000 just over a half-century ago.