Muhammad Ali's seizure of power

The massacre of the Mamluks at Cairo, Egypt, painted by Horace Vernet.

The process of Muhammad Ali's seizure of power in Egypt was a long three-way civil war between the Ottoman Turks, Egyptian Mamluks who had ruled Egypt for centuries, and Albanian mercenaries in the service of the Ottomans. It ended in victory for the Albanians led by Muhammad Ali of Egypt (1769–1849).

The three-way struggle followed the French invasion of Egypt by Napoleon. After the French defeat a power vacuum was created in Egypt. The Mamluks had governed Egypt before the French invasion and still retained much power. Egypt was officially a part of the Ottoman Empire and Egypt still had many Ottoman Turkish troops who had been sent to evict the French. Many of the best Ottoman troops were from Albania, then a province of the Ottoman Empire.

Albanians under Tahir rise and seize Cairo from Hüsrev Pasha

In March 1803, the British evacuated Alexandria leaving a power vacuum in Egypt. Muhammad Bey al-Alfi (aka Alfi Bey) (1751–1807) had accompanied the British to lobby them to help restore the power of the Mamluks. In their attempts to return to power, the Mamluks took Minia and interrupted communication between Upper and Lower Egypt.

About six weeks later, the Ottoman governor of Egypt Koca Hüsrev Mehmed Pasha, finding himself in a financial bind and unable to pay all the troops under his command, attempted to disband his Albanian bashi-bazouks (or Arnauts) without pay in order to be able to pay his regular, Turkish, soldiers.[1] The Albanians refused to disband, and instead surrounded the house of the defterdar (finance minister), who appealed in vain to Hüsrev Pasha to satisfy their claims. Instead, the Pasha commenced an artillery bombardment from batteries located in and near his palace on the insurgent soldiers who had taken the house of the defterdar, located in the Ezbekia. The citizens of Cairo, accustomed to such occurrences, immediately closed their shops and armed themselves. The tumult in the city continued all day, and the next morning a body of troops sent out by Hüsrev Pasha failed to quell it.

The Albanian commander Tahir Pasha then repaired to the citadel, gaining admittance through an embrasure, and from there began a counter bombardment of the pasha's forces over the roofs of the intervening houses. Soon thereafter, Tahir descended with his guns to the Ezbekia and then laid close siege to the governor's palace. The following day, Koca Hüsrev Mehmed Pasha fled with his women, servants, and regular troops to Damietta along the Nile.

Tahir then assumed the government, but within twenty three days encountered trouble due to inability to pay all of his forces. This time, it was Turkish troops who went without pay, and they in turn mutinied and assassinated Tahir Pasha. During the course of the mutiny, the governor's palace was burnt and plundered. A desperate, prolonged, and confusing conflict then ensued between the Albanians and Turks, with the divided Mamluks oscillating between the two factions or attempting to regain power on their own behalf.