Salzburg was built on mining, of both gold and salt, although salt (the so-called 'white gold') has always been more important. Salz is German for salt and Salzburg literally means 'Fortress of Salt'.
The city was originally a Celtic settlement and later a Roman trading centre called Juvavum. In about 696 the Frankish missionary St Rupert established a bishopric in Salzburg, which was subsequently made an archbishopric, with authority over the dioceses of Bavaria. Over time the archbishops became increasingly involved in temporal matters and in the 13th century each was granted the title of Prince of the Holy Roman Empire. Wolf Dietrich von Raintenau (1587-1612), one of the most influential archbishops, began the city's reconstruction in the baroque style. Over time, the prince-archbishops became more and more intolerant; in the late 15th century the Jews were expelled and in 1731-32 some 30,000 Protestants migrated to Prussia after a period of severe persecution.
Salzburg managed to stay out of the Thirty Years' War (1618-1648) and remained neutral during the War of Austrian Succession a century later, but after that its power and prosperity began to diminish. It came under completely secular rule in 1802 and during the Napoleonic Wars was controlled by France, and then Bavaria. The 1814 annexation of Salzburg by Austria under the Hapsburgs plunged the city into a recession. This had the benefit, not much enjoyed at the time, of ensuring that the historic buildings in the city centre were preserved, as no one could afford to build anything else.