Berthold succeeded his father Berthold IV in 1186. At the beginning of his reign, he reduced the power of the Burgundian nobles and settled the Bernese Oberland and the area of Lucerne. As a result, he enlarged Thun and founded Bern in 1191, which became the focus of his expansionism. At the battle of Ulrichen in 1211, however, he failed to gain access to the Valais. The resulting treaty, signed at Hautcret Abbey on 19 October 1211, forced Berthold to accept Savoyardsuzerainty over the upper Valais. Following the death of the Holy Roman EmperorHenry VI in 1198, he was one of the candidates in the Imperial election. He offered his nephews as hostages to the Archbishops of Cologne and Trier to gain their support. However, when he discovered that a majority had elected the HohenstaufenPhilip of Swabia he renounced his claim. In exchange for this renunciation, Berthold gained territorial concessions in what is now southern Germany and northern Switzerland, consolidating Zähringer hold over the Ortenau, the Breisgau, Schaffhausen, Breisach and All Saints' Abbey. In 1198 Philip also paid Berthold 3,000 silver Marks for renouncing his claims. His nephew Konrad von Urach who would eventually decline the papacy was put under the tutelage of Berthold's uncle. In the same year Berthold crushed an uprising of the Burgundian nobles, an event that is recorded on the gate in Freiburg. In 1200, Berthold began rebuilding Freiburg's city-parish church inRomanesque style. Around 1240 the building was continued in Gothic style. The church was finished in 1360 except for the choir that took another 150 years to complete. The church admired for its steeple is known as Freiburg Minster. Berthold married Clementia, daughter of Stephen III of Auxonne. Their son Berthold died before his father, in 1216. Therefore, with the death of Berthold V in 1218, the Zähringer dynasty became extinct in the male line. The Zähringer lands partly reverted to the crown, were granted imperial immediacy, or were divided between the houses of Urach, Kyburg and Fürstenberg.