The Treaty of San Germano was signed on 23 July 1230 at San Germano, present-day Cassino, ending the War of the Keys that had begun in 1228. The parties were Pope Gregory IX and Frederick II, king of Sicily and Holy Roman emperor. On 28 August at Ceprano, the peace was finalized with the readmission of the excommunicated Frederick into the church.
The negotiations for the treaty, initiated by Frederick, began in November 1229. The Lombard League, an ally of Gregory, objected to the process. The intercession of major German princes, especially Duke Leopold VI of Austria and Grand Master Hermann von Salza, was necessary to move things forward.