A significant decline in the population resulted from the invasion of the Mongols in 1241 and the subsequent famine. However, in medieval times the area of Slovakia was characterised by German and Jewish immigration, burgeoning towns, construction of numerous stone castles, and the cultivation of the arts. The arrival of German element sometimes proved a problem for the autochtonous Slovaks (and even Hungarians in the broader Hungary), since they often quickly gained most power in medieval towns, only to later refuse to share it. Breaking of old customs by Germans often resulted in national quarrels. One of which had to be sorted out by the king Louis I. with the proclamation Privilegium pro Slavis (Privilege for Slovaks) in the year 1381. According to this privilege, Slovaks and Germans were to occupy each half of the seats in the city council of Žilina and the mayor should be elected each year, alternating between those nationalities. This would not be last such case.