they were spared by his death in March 1238 (Rajab 635) shortly after he took Damascus. After this Khatun was careful to keep Aleppo out of the fratricidal wars which were the norm among the Ayyubids, turning down proposals for alliance from al-Jawad Yunus, the new ruler of Damascus, who wanted to revive the anti-Egyptian coalition, and later from As-Salih Ismail, who succeeded him. In 1240, she was able to use her neutrality in these conflicts to broker a formal declaration from the Sultan as-Salih Ayyub in Egypt, which committed the Sultan to respecting Aleppo's independence. In 1240 new threat to Aleppo emerged in the shape of the Khwarezmians who had allied themselves with as-Salih Ayyub and whom he had settled to the east of Aleppo in Diyar Mudar. For reasons which are not clear, a large Khwarezmian army of around 12,000 men crossed the Euphrates and threatened Aleppo. A small Aleppan force of 1,500 cavalry led by Al-Muazzam Turanshah was defeated in November 1240 (Rabi' II) and the city lay exposed. A large force came up from Homs and deterred the Khwarezmians from attacking. They withdrew back across the Euphrates. In early 1241 they attacked again, but the army of al-Mansur Ibrahim of Homs once defeated them decisively, and thereafter the forces of Homs and Aleppo took control of all of as-Salih Ayyub's territories in the Jazira with the exception of Hasankeyf. As-Salih Ayyub was too preoccupied with affairs in Egypt to be able to respond. Patronage Khatun was born in the city of Damascus. Saladin’s conquest of the city kicked off an 85-year period of “intense and sustained” patronage by women until the 1260 Mongol invasion. Khatun, likely, had always intended to be a court patron considering female patrons were a tradition of Damascus by the time she was born. “Architectural patronage of women in Damascus surpassed that in Aleppo during the twelfth century, although the rise of Dayfa Khatun and the foundation of the madrasa al- Firdaws in the first half of the thirteenth century seems to have reversed this situation.” As ruler of Aleppo, Khatun exercised her power by dedicating her efforts to civic affairs and the patronage of scholars and mystics. She sponsored two major architectural structures, the Khanqah al-Farafra and the Madrasa al-firdaws. Both were privileged locations and thus especially desirable for pious foundations: the former was the residential quarter of the city's notables;