Under Habsburg rule
The city would remain under Austrian Habsburg rule for over 450 years (except for a brief period of French rule between 1809 and 1813) until the end of World War I in 1918.
Austrian presence on the Adriatic Sea was seen as a threat by the Republic of Venice and during the War of the League of Cambrai, the Venetians raided and devastated the city resulting in a large number of deaths in 1508 and again in 1509. However, the city recovered and remained under Austrian rule. For its fierce resistance to the Venetians it received the title of the "most loyal city" ("fidelissimum oppidium") as well as commercial privileges from the Austrian emperor Maximilian I in 1515. While Ottoman forces attacked the town several times, they never occupied it. From the 16th century onwards, Rijeka's present Renaissance and Baroque style started to take shape. Emperor Charles VI declared the Port of Rijeka a free port (together with the Port of Trieste) in 1719 and had the trade route to Vienna expanded in 1725.
On November 28, 1750 Rijeka was hit by a large earthquake. The devastation was so widespread that the city had to be almost completely rebuilt. In 1753, the Austrian Empress Maria Theresa approved the funding for rebuilding Rijeka as a "new city" ("Civitas nova"). The rebuilt Rijeka was significantly different - it was transformed from a small medieval walled town into a larger commercial and maritime city centered around its port.
By order of Maria Theresa in 1779, the city was annexed to the Kingdom of Hungary and governed as corpus separatum directly from Budapest by an appointed governor, as Hungary's only international port. From 1804, Rijeka was part of the Austrian Empire (Kingdom of Croatia-Slavonia after the Compromise of 1867), in the Croatia-Slavonia province.
During the Napoleonic Wars, Rijeka was briefly captured by the French Empire and included in the Illyrian Provinces. During the French rule, between 1809 and 1813, the critically important Louisiana road was completed (named after Napoleon's wife Marie Louise). The road was the shortest route from Rijeka to the interior (Karlovac) and gave a strong impulse to the development of Rijeka's port. In 1813 the French rule came to an end when Rijeka was first bombarded by the Royal Navy and later re-captured by the Austrians under the command of the Irish general Laval Nugent von Westmeath. The British bombardment has an interesting side story. The city was apparently saved from annihilation by a young lady named Karolina Belinić who - amid the chaos and destruction of the bombardment - went to the English fleet commander and convinced him that further bombardment of the city was unnecessary (the small French garrison was quickly defeated and left the city). The legend of Karolina is warmly remembered by the population even today. Karolina Riječka (Caroline of Rijeka) became a folk hero and has been celebrated in plays, movies and even in a rock opera.
In the early 19th century, the most prominent economical and cultural leader of the city was Andrija Ljudevit Adamić.
Fiume also had a significant naval base, and in the mid-19th century it became the site of the Imperial and Royal Naval Academy (K.u.K. Marine-Akademie), where the Austro-Hungarian Navy trained its officer cadets.
During the Hungarian revolution of 1848, when Hungary tried to gain independence from Austria, Rijeka was captured by the Croatian troops (loyal to Austria) commanded by Ban Josip Jelačić. The city was then annexed directly to Croatia, although it did keep a degree of autonomy.
Giovanni de Ciotta (mayor from 1872 to 1896) proved to be an authoritative local political leader. Under his leadership, an impressive phase of expansion of the city started, marked by major port development, fuelled by the general expansion of international trade and the city's connection (1873) to the Austro-Hungarian railway network. Modern industrial and commercial enterprises such as the Royal Hungarian Sea Navigation Company "Adria", a rival shipping company the Ungaro-Croata (established in 1891) and the Smith and Meynier paper mill (which operated the first steam engine in south-east Europe), situated in the Rječina canyon, producing cigarette paper sold around the world.
The second half of the 19th century and the beginning of the 20th century (up to World War I) was a period of great prosperity, rapid economic growth and technological dynamism for Rijeka. Many authors and witnesses describe Rijeka of this time as a rich, tolerant, well-to-do town which offered a good standard of living, with endless possibilities for making one's fortune. The Pontifical Delegate Celso Costantini noted in his diary "the religious indifference and apathy of the town". The further industrial development of the city included the first industrial scale oil refinery in Europe in 1882 and the first torpedo factory in the world in 1866, after Robert Whitehead, manager of the "Stabilimento Tecnico Fiumano" (an Austrian engineering company engaged in providing engines for the Austro-Hungarian Navy), designed and successfully tested the world's first torpedo. In addition to the Whitehead Torpedo Works, which opened in 1874, the oil refinery (1882) and the paper mill, many other industrial and commercial enterprises were established or expanded in these years. These include a rice husking and starch factory (one of the largest in the world), a wood and furniture company, a wheat elevator and mill, the Ganz-Danubius shipbuilding industries, a cocoa and chocolate factory, a brick factory, a tobacco factory (the largest in the Monarchy), a cognac distillery, a pasta factory, the Ossoinack barrel and chest factory, a large tannery, five foundries and many others. At the beginning of the 20th century more than half of the industrial capacity in Croatia (which was at that time mostly agrarian) was located in Rijeka.
Rijeka's Austro-Hungarian Marine Academy became a pioneering centre for high-speed photography. The Austrian physicist Peter Salcher working in the Academy took the first photograph of a bullet flying at supersonic speed in 1886, devising a technique that was later used by Ernst Mach in his studies of supersonic motion.
Rijeka's port underwent tremendous development fuelled by generous Hungarian investments, becoming the main maritime outlet for Hungary and the eastern part of the Austro-Hungarian Empire. By 1913–14, the port of Fiume became the tenth-busiest port in Europe. The population grew rapidly from only 21,000 in 1880 to 50,000 in 1910. Major civic buildings constructed at this time include the Governor's Palace, designed by the Hungarian architect Alajos Hauszmann. There was an ongoing competition between Rijeka and Trieste, the main maritime outlet for Austria—reflecting the rivalry between the two components of the Dual Monarchy. The Austro-Hungarian Navy sought to keep the balance by ordering new warships from the shipyards of both cities.
In the 19th century, the city was predominantly Italian-speaking, regardless of ethnic background. Italian nationalism arose in the city at the end of the century, and was less intense compared to autonomism. According to the census of 1880, 9,076 residents used Italian as their "habitual language", 7,991 Croatian, 895 German, and 383 Hungarian. The 1851 census reported a Croatian majority, though considered not very reliable by Italian historians.
At the last Austro-Hungarian census in 1910, the corpus separatum had a population of 49,806 people and was composed of the following linguistic communities:
By religion, the census of 1910 indicates that - from the total of 49,806 inhabitants - there were 45,130 Catholics, 1,696 Jewish, 1,123 Calvinist, 995 Orthodox and 311 Lutheran. The Jewish population expanded rapidly, particularly in the 1870s-1880s, and built a large synagogue in 1907 (which would be destroyed in 1944, during the German occupation, concurrent with the murder of most of the city's Jewish residents). On the eve of WWI, there were 165 inns, 10 hotels with restaurants, 17 cafés, 17 jewellers, 37 barbers and 265 tailor shops in Rijeka.