In the 12th century, following the overthrow of the Isma'ili Fatimid dynasty, Saladin (the founder of the Sunni Ayyubid Dynasty) converted Al-Azhar to a Shafi'ite Sunni center of learning.[1][14] Therefore, the Encyclopaedia of Islam (Leiden, 1936, 3rd vol., p. 353) writes that, "He had all the treasures of the palace, including the books, sold over a period of ten years. Many were burned, thrown into the Nile, or thrown into a great heap, which was covered with sand, so that a regular "hill of books" was formed and the soldiers used to sole their shoes with the fine bindings.