How did Frederick II gain control of Jerusalem during the Sixth Crusade?
Frederick II gained control of Jerusalem during the Sixth Crusade not through military force, but through diplomacy. Facing opposition from local barons and having been excommunicated by Pope Gregory IX, Frederick relied on his own small contingent of German Crusaders and the Teutonic Knights to negotiate with the Ayyubid sultan al-Malik al-Kāmil of Egypt.12
The resulting treaty of 1229 was unique in the history of the Crusades. Under its terms:1
* Jerusalem, Bethlehem, and a corridor to the sea were ceded to the kingdom of Jerusalem.12
* The Muslims retained control of the Temple area, including the Dome of the Rock and the Aqṣā Mosque.1
* Muslim residents were permitted to keep their homes, property, and their own justice system.1
* The city's walls remained destroyed, and the peace was intended to last for 10 years.1
Following this agreement, Frederick entered Jerusalem and crowned himself king in the Church of the Holy Sepulchre on March 18, 1229.12