The parties were Pope Gregory IX and Frederick II, king of Sicily and Holy Roman emperor.
The intercession of major German princes, especially Duke Leopold VI of Austria and Grand Master Hermann von Salza, was necessary to move things forward.
The most important negotiator on the papal side was Cardinal Thomas of Capua, although Gregory's actual representative at the signing was Guala de Roniis.
The causes of the War of the Keys were Frederick's failure to lead the Sixth Crusade on the schedule he had agreed and his alleged violations of ecclesiastical rights, especially in the Papal State in central Italy.
[2] Gregory absolved his subjects of their oaths of allegiance and launched a war into the dispute central Italian territory and into southern Italy, with the goal of confiscating the Kingdom of Sicily.
Frederick, having successfully recovered Jerusalem on crusade, returned to Italy and quickly threw the papal forces back on their own territory.
[6] In April 1230, however, to prevent him from taking part in the negotiations, Gregory renewed the excommunication of Rainald of Urslingen, who had led the invasion of the Papal States.
Frederick surrendered his traditional legatine authority over the Sicilian church, agreeing to free ecclesiastical elections and exempting the clergy from secular courts, taxes and tallages.
[18] The status of Gaeta and Sant'Agata would be resolved by further discussion or arbitration within twelve months, leaving the pope with certain rights over two cities in the Sicilian kingdom.
[20] The pope would recognize the treaty of Jaffa of 1229, which had ended the Sixth Crusade and restored Jerusalem to Christian rule.
The pope's charges against Frederick that led to his excommunication were publicly read by Patriarch Berthold of Aquileia, Archbishop Eberhard of Salzburg and Bishop Siegfried of Regensburg.
[14] Count Thomas of Acerra, on Frederick's behalf, swore on the Gospels to obey the church and the agreed "form of peace".
Oaths were then sworn by Frederick's fidejussores, princes who pledged that for eight months from the day his excommunication was lifted they would assure his compliance and fight for the church if he reneged.
All the oaths were recorded in "testimonial letters", to which the parties affixed their seals, including the imperial golden bull.
[14] On 28 July, Duke Leopold VI of Austria, who had played a leading role in negotiations, died suddenly.
Insofar as he succeeded in having his excommunication lifted and Gregory failed to bring the Sicilian kingdom under his control, the peace has been viewed as a victory for Frederick.
[30] Peter Partner argues that the treaty of San Germano shows how the pope's power was actually independent of his military capabilities.