Thun (French: Thoune) is a municipality in the district of Thun in the canton of Berne in Switzerland with about 42,136 inhabitants (1 January 2006).
It is located where the River Aare flows out of Lake Thun (Thunersee), 19 km south of Bern. Besides tourism, machine and apparatus engineering, the largest garrison of the country, the food industry and publishing are of economic importance to Thun.
The area of what is now Thun was inhabited since the Neolithic age (mid-3rd millennium BC). The name of the city derives from the Celtic term Dunum, meaning "fortified city". It fell to Rome in 58 BC, when Roman legions conquered almost all Switzerland, and soon became one of the main centres of Roman administration in the region.
The Romans were driven off from Thun, along with the whole of Switzerland, by the Burgundians around 400 AD. The Aare became the frontier between the Christian Burgundians and the Pagan, German-speaking Alemanni, who lived north. Thun was mentioned for the first time during the 7th century, in the chronicle of Frankish monk Fredgar.
The region of Thun became a part of the Holy Roman Empire in 1033, when Conrad II gained the title of King of Burgundy.
The emperors entrusted the Zähringen family, centred in Bern, to subdue the unruly nobles of central Switzerland. Around 1190 Duke Bertold V of Zähringen, built a castle in Thun and expanded the city. After Bertold's death in 1218, his territories went to Ulrich III von Kyburg.
In 1264 Thun received state rights and in 1384 the town was bought by the canton of Bern. Thun was the capital of the Oberland canton of the Helvetic Republic.
In 1819 a Military School was founded in the city, which later developed in the main military school in Switzerland. Thun was connected to the railway network of Switzerland in 1859 and telephone access made available in 1888.