Frederick marched on Acre, in Syria. Acre was under the control of the Islamic Mamluks. But not everyone supported him; the Pope even excommunicated him. The political problems between the Guelfs and the Ghibellines that had troubled Frederick at home continued to be a problem in Syria.
Then Frederick got an offer from al-Kamil, the Ayyubid sultan of Egypt. Al-Kamil wanted to put his brother in power in Syria in place of the Mamluks. He would hand over Jerusalem, Nazareth, and Bethlehem to Frederick in exchange for help from Frederick’s army. Frederick agreed, and crowned himself King of Jerusalem in 1229 AD.
But only a few months later Frederick II had to go home to Italy because of problems there. He left Jerusalem without an army to protect it. The truce held for a while, as the Ayyubids got weaker and weaker. But in 1244, the Mamluks, who were rising into power in West Asia, took Jerusalem.