Castel Goffredo is a comune in the province of Mantua, in Lombardy. It lies in a region of springs at the foot of the slopes that drain into Lake Garda, towards the plain of the Po. Founded in a region inhabited from the Bronze Age, Castel Goffredo belonged to the count-bishops of Brescia from the ninth century to 1115, when the commune was established. When Brescia proved unable to come to the commune's defense, in 1337 it placed itself under the protection of Mantua and the Gonzaga. From 1348 to 1404 it was governed from Milan by the Visconti and returned to the Gonzaga in 1441.
Castel Goffredo became the seat of an autonomous feudo of marquis Aloysio Gonzaga in 1511. At his death, his fiefs of Castel Goffredo, Castiglione delle Stiviere and Solferino were divided among his three sons. The eldest, Alfonso, who gained Castel Goffredo, was assassinated in 1592 by members of the household of his nephew Rodolfo Gonzaga of Castiglione, brother of the saintly Aloysius Gonzaga; Alfonso, publicly tried for murder but acquitted, was murdered in turn, 31 January 1593, occasioning a popular uprising that re-established the Magnifica Comunità. The territory was annexed in 1603 by the duchy of Milan following a bitter suit heard before the Emperor, and remained Milanese territory until 1707. In 1707, the Austrians took over the region and the Habsburgs then ruled the area until 1859, save only for a decade or so of French rule during the time of Napoleonic Wars.