Ayyubid dynasty
During the late eleventh and twelfth centuries, the Fatimid caliphate declined rapidly, and in 1171, Saladin invaded its territory. He founded the Ayyubid dynasty and incorporated the Fatimid state into the nominal sphere of authority of the .