Bern, city, capital of Switzerland and of Bern canton, in the west-central part of the country. It lies along a narrow loop of the Aare River. The existence of the ancient castle of Nydegg, guarding a crossing over the Aare, probably led Berthold V, duke of Zähringen, to found Bern in 1191 as a military post on the frontier between the German-speaking Alemanni and the French-speaking inhabitants of Burgundy.