Apart from the rapid economic growth, the period encompassing the second half of the 19th century and up to World War I also saw a shift in the ethnic composition of the city. While earlier in the 19th century the city demographics was mostly Croatian (according to the 1851 census there were 12000 Croats and 651 Italians), this changed later on. The Kingdom of Hungary, which administered the city in the second half of the 19th century, favored the Hungarian element in the city and encouraged immigration from all lands of the Austro-Hungarian Empire. In this period the city became a melting pot encompassing most of the main ethnicities and cultures in the empire, being also a main departure port for emigration to the New World. It was not unusual for inhabitants to speak 4 languages (Italian, Croatian, German, Hungarian). The mixed ethnic composition would open the doors to the controversial "Fiume Question" in the years following World War I and the demise of the Habsburg Empire.