The Medici ruled over Florence and most of Tuscany for more than three centuries, but their dynasty finally came to an end with the death of Gian Gastone in 1737.
Following the Medici came the Dukes of Lorraine from Austria who ruled until Napoleon came on the scene in 1796.
The Lorraines encouraged the city’s liberal tradition, introducing various reforms and promoting the free circulation of trade and ideas. It was at this time that Diderot and D’Alembert’s famous Encyclopedie, prohibited elsewhere, was published in Livorno, and the first bathing establishment was opened in the town. The first Palio Marinaro, a rowing contest between the town’s various districts, also took place to celebrate the arrival of Pietro Leopoldo who governed Livorno from 1765 to the end of the century.
This was the era of the Grand Tour, and Livorno was visited by many illustrious literary figures, including Shelley and Byron, both of whom spent some time here. The Scottish writer Tobias Smollett spent the latter years of his life in the Villa Gamba in Antignano. He died in 1771 and was buried in the Old English Cemetery in Via Verdi, becoming the cemetery's most famous figure. His grave was visited by many illustrious figures including Charles Dickens.
In 1796 Livorno was invaded by Napoleon and his army, beginning a period of decline for the city.