Mantua was famous during Roman times as the birthplace of the epic poet Virgil, who was born around 70 BC. It remained anonymous until it became part of the lands of Countess Matilda of Canossa during the 11th century. She was initially a great supporter of the pope against the emperor. Her advisor, Anselmo, later became the patron saint of the city. Not very long afterwards, Mantua switched sides to the Ghibelline, and became and long term independent commune ally of the emperor.
Dominated first by the Bonacolsi family than the Gonzagas, the city grew rich by collecting tolls from the rivers, and from the stability provided by its setting and the protection from the emperor who used to see Mantua as an important buffer between Venice and Milan. From 1328 until 1630, a period of amazing stability for the city, the Gonzagas led one of the liveliest and richest courts. It attracted artists of the likes of Pisanello, Italy's Gothic master, and Mantegna, the leading Renaissance artist in northern Italy. One of the most famous patrons was Isabella d'Este who was married to Gianfrancesco II, who led the Italians to defeat at Fornovo in 1494. The last renowned Gonzaga, Vincenzo I, was the patron of Rubens and of Monteverdi, who composed what is believed to be the first modern opera, L'Orfeo in 1607.
The city went trrough economic hard times after Vincenzo I. In 1628, Vincenzo II felt compelled to sell many of the Gonzaga's art treasures to the English king. In 1630, the Gonzaga's claim the Duchy of Monferrato, which the Gonzaga's had acquired via marriage a century earlier, conflicted with that of the Imperial Habsburgs. This resulted in the capture of the town, which then went along much humbled for the rest of the 17th century until it was incorporated into more direct Austrian rule in 1707. The gained some independence: it was the Duchy of Mantua, distinct from the Duchy of Lombardy who was based in Milan, that governed much of the region.