In 1803, Salzburg was secularised (stopped being control by the church) as the Electorate of Salzburg. The former Grand Duke Ferdinand III of Tuscany (brother of Emperor Francis II) was made elector. In 1805 Salzburg became a part of Austria, and in 1809, a part of Bavaria. The Bavarians closed the University of Salzburg, banned monasteries from accepting novices (new monks for training), and banned pilgrimages and processions. The Congress of Vienna returned Salzburg to the Austrians in 1814.