The sultan actively conspired to depose Mehmed Ali from afar. [fact]
After Mehmed Ali's forces succeeded in capturing the cities of Mecca and Medina from the Wahhabis he sent one of his mamluks, a certain Latif Ağa, to Istanbul to present the keys of both cities to the Sultan as a sign of obedience and servitude. During his stay in Istanbul, however, Latif Ağa was given the title of Pasha and encouraged to rebel against his master in Egypt. On his return to Cairo rumors were circulating that he had returned armed with a firman to depose Mehmed Ali and to replace him as vali of Egypt. Mehmed Ali, who was in Arabia at this time overseeing the campaign against the Wahhabis, was informed of this conspiracy at the last moment by his friend and deputy, Mehmed Lazoğlu, and hurried back to Egypt to attend personally to that challenge to his authority. He arrived too late, however, to take personal revenge against Latif Pasha whom Mehmed Lazoğlu had summarily beheaded at the foot of the Citadel.
XREF: Builds on the earlier claim (loc 218) that the sultan distrusted Mehmed Ali from the outset; this conspiracy confirms that distrust escalated into active plotting.
QUESTION: How did Mehmed Ali's depose-and-console strategy co-exist with the sultan actually orchestrating his replacement?
Builds on: "The sultan distrusted Mehmed Ali from the outset and resented his install."
Khaled Fahmy, All the Pasha_s Men_ Mehmed…, loc. 219