In 1517 Egypt was conquered by the Ottoman Empire. How complete was this conquest? Did the Mamlukes continue to hold any significant political power in the following centuries?

by IceNipples
Zooasaurus

I'll try to answer your question, sorry if it doesn't satisfy you.

The conquest of Egypt is more or less completed militarily in 1517, however the Ottomans hadn't consolidated their power in the region yet and faced many problems, mainly from the Egyptian Arab populace and the many of the Mamluks that wanted to restore the sultanate. They eventually managed to consolidate their power in 1525

The Ottoman conquests initially brought many changes and difficulties to the Egyptian populace. Ottoman conquests brought economic distress, as the Ottoman control of their subject's property was strict and those who didn't satisfy the supervisor or failed to follow bureaucratic procedures lost their rights. Shopkeepers were ordered to replace the Egyptian weights and measures with those used in Istanbul. New debased coins were put into circulation, causing the public to lose up to a third of the value of its money. Regulations concerning exchange rates and prices were issued frequently, resulting in inflation, the closing of markets, and general dissatisfaction and uneasiness. The Ottoman legal traditions also conflicted with the Egyptians. There was much resentment against the Kanun, and the notions of Ottoman justice were different to those of the Egyptians. For example, a Jew sued a Mamluk emir for a sum of money. When the emir refused to come to the court, the Ottoman judge arrested the emir and remained so until he can satisfy the Jew's demands, something that was unthinkable under Mamluk rule. The same judge had also ruled in favour of a woman who sued her husband, an influential emir. While the Ottomans were pleased on how everyone was equal before the Ottoman court, the people are hostile to the judicial system. The Egyptians were also shocked by the sürgün, that caused hardships and sufferings to the Egyptian people. While in time the Ottomans corrected their mistakes and they and the Egyptians became accustomed to each other, this was the case during the early years and it developed tension between the Ottomans and Egyptians

With the death of Selim I and Khai'r Bey, Mamluk governor installed by the Ottomans the Mamluks started to rebel. In May 1523, Janim al-Sayfi and Inal, two provincial governors of Middle Egypt rose up and led the first Mamluk revolt supported by many Mamluks and Arabs, including the powerful Arab ruler of Upper Egypt, Ali ibn Umar. Eventually the revolt was crushed, but the rebellion further strained the relations between the Mamluks and the Ottomans. Many Mamluks that had joined the rebels were killed, and those who remained loyal reportedly fought with little enthusiasm.

A year latter, Ahmet Pasha, the governor of Egypt instigated a revolt which was a serious challenge to Ottoman rule. He had become the governor of Egypt in September 1523 and prepared the revolt soon after. He confiscated the Janissaries’ muskets, expelled the Kapikulu to Istanbul, wooed the Mamluks and pardoned many who participated in the rebellion. he also forcefully extort money from the merchants and requisitioned many beasts of burden. He also raided the Nubian territories to create his own black slave-soldiers and training them to use firearms. The pasha rebelled against Istanbul in 1524 and quickly massacred what remained of the janissaries. He claimed the title of sultan, and ordered coins bearing his name to be minted and decreed that his new title be recited publicly during the Friday hutbe. To legitimize his position, Ahmet invited the four chief qadis and the Abbasid caliph to the Citadel at the beginning of each month to greet him as had been the custom under the Mamluk sultans. However, his rule only lasted a few months. Janim al-Hamzawi, a loyalist Mamluk emir with his army managed to surprise him and he escaped to Sharqiya, where he was captured and beheaded on March 6.

Even though the rebellion of Ahmet Pasha failed, Egypt remained unstable because the revolt had stirred up the Arabs throughout the country. The bedouin Arabs believed that the Ottomans in Egypt were exhausted and could be defeated easily. The Arabs however were disunited and their arms and discipline were inferior. With fresh reinforcements arrived in Egypt the province was finally subdued. On April 2, 1525, Süleyman’s famous Grand Vizier, Ibrahim Pasha, came to Egypt and restored Ottoman authority. During his stay in Egypt, he consolidated Ottoman rule in Egypt and its administration. He promulgated the edict codifying the administrative practice of the province, the Kanunname-i-Misir which laid the foundations of the military administration in force for the next three centuries. The edict assigned responsibilities to provincial rulers to maintain the irrigation system, maintaining security, and supervising tax-collection. Long passages are devoted to how the peasantry are to be treated and their taxes collected. Cadastral surveys, fallow land, land not reached by the Nile floods, waqf foundations, granaries, seaports and the mint are also treated in the code. Finally, the code also officially recognized the Mamluks. The Mamluks were reorganized into a regiment, pensions and titles from Mamluk times were maintained, Mamluk emirs were recognized, and many Mamluks were appointed as bureaucratic staff. Later on the Mamluk beys did indeed hold high positions, even de facto ruled Egypt. For a brief overview, see my earlier answer

Sources:

"Egyptian Society Under Ottoman Rule" by Michael Winter

"Encyclopedia of the Ottoman Empire" by Bruce Masters et al