Palestine at the behest of other leaders in the Jewish community. Eventually Pietism fell out of favor in Egypt, as its leaders were exiled and Jewish immigration slowed. Per Fenton, the influence of Sufism is still present in many Kabbalistic rituals, and some of the manuscripts authored under the Maimonides dynasty are still read and revered in Kabbalist circles. Ottoman rule (1517 to 1914) On January 22, 1517, the Ottoman sultan, Selim I, defeated Tuman Bey, the last of the Mamelukes. He made radical changes in the governance of the Jewish community, abolishing the office of nagid, making each community independent, and placing David ibn Abi Zimra, at the head of that of Cairo. He also appointed Abraham de Castro to be master of the mint. It was during the reign of Selim's successor, Suleiman I, that Aḥmad Pasha, Viceroy of Egypt, revenged himself upon the Jews because de Castro had revealed in 1524 to the sultan of his designs for independence. The "Cairo Purim," is still celebrated in commemoration of their escape. Towards the end of the 16th century, Talmudic studies in Egypt were greatly fostered by Bezaleel Ashkenazi, author of the "Shiṭṭah Meḳubbeẓet". Among his pupils were Isaac Luria, who as a young man had gone to Egypt to visit a rich uncle, the tax-farmer Mordecai Francis (Azulai, "Shem ha-Gedolim," No. 332); and Abraham Monson. Ishmael Kohen Tanuji finished his "Sefer ha-Zikkaron" in Egypt in 1543. Joseph ben Moses di Trani was in Egypt for a time (Frumkin, l.c. p. 69), as well as Ḥayyim Vital Aaron ibn Ḥayyim, the Biblical and Talmudical commentator (1609; Frumkin, l.c. pp. 71, 72). Of Isaac Luria's pupils, a Joseph Ṭabul is mentioned, whose son Jacob, a prominent man, was put to death by the authorities. According to Manasseh b. Israel from 1656, "The viceroy of Egypt has always at his side a Jew with the title 'zaraf bashi,' or 'treasurer,' who gathers the taxes of the land. At present Abraham Alkula holds the position". He was succeeded by Raphael Joseph Tshelebi, the rich friend and protector of Shabbatai Zevi. Shabbetai was twice in Cairo, the second time in 1660. It was there that he married the ill-famed Sarah, who had been brought from Leghorn (Livorno). The Shabbethaian movement naturally created a great stir in Egypt. It was in Cairo that Miguel (Abraham) Cardoso, the Shabbethaian prophet and physician, settled in 1703