In 1174, Egypt came under the rule of Ayyubids. The Ayyubids ruled from Damascus, not the City of Cairo. This dynasty fought against the Crusader States during the Fifth Crusade. Ayyubid Sultan Najm al-Din recaptured Jerusalem in 1244. He introduced Mamluk forces into his army in order to hold off the crusaders. This decision would be one he regretted.