In the 13th century, the Turkish slave girl Shajar al-Durr wins the heart of the last Ayubbid ruler, As-Salih Ayyub, and so begins a web of intrigue. She ensures the news of his death in 1249 is hidden from soldiers fighting the Seventh Crusade, spearheading a victory at the Battle of Mansurah in the process. She is sidelined by the heir Al-Muazzam Turanshah, a son of As-Salih’s first wife, but her cause is championed by the chief Mamluk in the Guard, Aybak, who kills Turanshah and his men and crowns her his queen as the new King of Egypt, beginning the Mamluk Sultanate. Soon Aybak himself becomes an obstacle to her ambitions, and she pays an assassin to kill him in 1257. Salama, his first wife, is depicted in the film as avenging her with the blessing of the last Abbasid Caliph in Baghdad, Al-Musta'sim, who sends an envoy to convey his excommunication of Shajar and help Salama pay off Shajar’s guards to abandon her. Within a year Al-Musta’sim would himself be slaughtered and Baghdad razed to the ground by the troops of Mongol ruler Hulagu Khan, ending his dynasty and continuing their invasions until thwarted by her enduring Mamluks in 1260 at the Battle of Ain Jalut.