Hohensalzburg Castle is a castle in the Austrian city of Salzburg, atop the Festungsberg mountain. Erected at the behest of the Prince-Archbishops of Salzburg, it today with a length of 250 m (820 ft) and a width of 150 m (490 ft), is one of the largest medieval castles in Europe.
Construction of the fortress began in 1077 under Archbishop Gebhard von Helfenstein. This original design was just a basic bailey with a wooden wall. In the Holy Roman Empire, the Salzburg Archbishops already were powerful political figures, and they expanded the castle to protect their interests. Gebhard's conflict with Emperor Henry IV during the Investiture Controversy influenced the expansion of the castle, with the Archbishop taking the side of Pope Gregory VII and the German anti-king Rudolf of Rheinfelden. The castle was gradually expanded during the following centuries. The ring walls and towers were built in 1462 under Prince-Archbishop Burkhard II von Weißpriach. Prince-Archbishop Leonhard von Keutschach during his term from 1495 until 1519 further expanded the castle. His coadjutor Matthäus Lang von Wellenburg, who was later to succeed Leonhard, in 1515 wrote a description of the Reisszug, a very early and primitive funicular railway that provided freight access to the upper courtyard of the castle. The line still exists, albeit in updated form, and is probably the oldest operational railway in the world. The only time that the fortress actually came under siege was during the Peasants' War in 1525, when a group of miners, farmers and townspeople tried to oust Prince-Archbishop Matthäus Lang, but failed to take the castle. In 1612 the deposed Archbishop Wolf Dietrich von Raitenau died here in prison. During the Thirty Years' War, Archbishop Count Paris of Lodron strengthened the town's defenses, including Hohensalzburg. He added various parts to the fortress, such as the gunpowder stores and additional gatehouses. The fort was surrendered without a fight to French troops under General Jean Victor Marie Moreau during the Napoleonic War of the Second Coalition in 1800 and the last Prince-Archbishop Count Hieronymus von Colloredo fled to Vienna. In the 19th century, it was used as barracks, storage depot and dungeon before being abandoned as a military outpost in 1861.