In the Middle Ages Salzburg became wealthy by the trade with salt from the nearby Dürnberg in Hallein. Till the 14th century Salzburg became independent from Bavaria and was a state within the Holy Roman Empire. The citizens of Salzburg were under the command of the archbishop unlike other cities in the empire. In the baroque era the look of today's city was shaped. The cathedral was rebuilt in the baroque style. Most of the architects came from Italy. 1622 a university was founded. Due to the fact that it was a catholic state Protestants had a severe standing in Salzburg. Yet 1731 Protestants, who came not back to the catholic belief had do leave Salzburg within eight days.