When Cezayirli Gazi Hasan Pasha was ordered by the sultan
Abdülhamid I to take troops to
Egypt and drive out the
Mamluk emirs led by
Ibrahim Bey (Mamluk) and
Murad Bey, who had become
de facto rulers of the province, Ismail Pasha went with him. When Hasan Pasha completed the removal (at least temporarily) and departed, he left Ismail Pasha behind in Egypt. When the Mamluk emirs, who had secured a negotiation with Ismail Pasha's predecessor
Keki Abdi Pasha as to their power and holdings in Egypt, found that he had been replaced by Ismail Pasha, they refused to honor the deal. Abdi Pasha, angry over his dismissal and this turn of events, sent agents to
Istanbul, the capital, to persuade the sultan to reappoint him as governor. This was successful, and within a month, on 3 January 1789, news arrived that Abdi Pasha had been reappointed the governor of Egypt and Ismail Pasha had been dismissed. Ismail Pasha then proceeded to whitewash and clean the walls of
Al-Azhar University, among other things. News also arrived that sultan
Abdülhamid I had died on April 7, being replaced by
Selim III, and that Ismail Pasha's former employee Cezayirli Gazi Hasan Pasha had been dismissed from the post of
Kapudan Pasha after holding the office for 20 years. In early 1791, an extremely deadly plague ravaged Egypt, killing many of all ages including
Ismail Bey al-Kabir, the favored
Mamluk emir at the time. After his death, other Mamluk emirs competed over who would take leadership of the emirs. Mass graves were dug for the dead. In the first few days of May 1791, a message arrived from Istanbul, dismissing Ismail Pasha from the governorship and replacing him with
Safranbolulu Izzet Mehmet Pasha. Ismail Pasha was told to report to
Morea Eyalet (modern
Peloponnese peninsula,
Greece), of which he was now appointed as governor. They put him under house arrest, and when the new governor arrived and Ismail Pasha paid what he owed, he finally left on a ship for Morea on 26 June 1791. ==Governorship of Morea and death==