 Under the Bahri sultans, the promotion of Sunni Islam was pursued more vigorously than under the Ayyubids.The Mamluks were motivated in this regard by personal piety or political expediency for Islam was both an assimilating and unifying factor between the Mamluks and the majority of their subjects; the early mamluks had been brought up as Sunni Muslims and the Islamic faith was the only aspect of life shared between the Mamluk ruling elite and its subjects.While the precedent set by the Ayyubids highly influenced the Mamluk state's embrace of Sunni Islam, the circumstances in the Muslim Middle East in the aftermath of the Crusader and Mongol invasions also left Mamluk Egypt as the last major Islamic power able to confront the Crusaders and the Mongols.