In 1341 King John of Bohemia allowed Jewish families to reside within the city walls, and the first synagogue was built in 1380; however several pogroms occurred in the late 15th and early 16th century. Since the Hussite Wars, the city was traditionally a bulwark of the Catholic Church during the long-lasting religious conflicts in the Kingdom of Bohemia. A part of the Habsburg Monarchy from 1526, Budejovice remained a loyal supporter of Emperor Ferdinand II in the Thirty Years' War. Budějovice underwent a short occupation by Prussia during the Silesian Wars, and the war between the Habsburgs and the French army in 1742.