Ali Pasha was born in Georgia and kidnapped together with his brother. He was "fair-complexioned," had an "immense blond beard and mustaches," and had Turkish as his native tongue, speaking very little Arabic. He was a slave owned by a governor of Ottoman Algeria named Mehmed Pasha but eventually rose to a post in the provincial government. After procuring a ship, Ali Pasha sailed to his hometown of Tripoli and briefly wrested control of the Tripolitania province from the long-ruling Karamanli dynasty for the Ottoman Empire. The inhabitants of the province reportedly helped him gain control of Tripolitania, since they realized that he was the legitimate Ottoman governor. However, Ali Pasha's men pillaged Tripoli and angered the populace, who then reinstated the Karamanlis as rulers and ousted Ali Pasha. Ali Pasha then went to Egypt. There, he became intimate friends with the Mamluk emir Murad Bey, who had held de facto power over Egypt for decades. Ali Pasha then went on the Hajj to Mecca, and there, he was allegedly discovered to be engaging in sexual intercourse with a young boy that he had kidnapped from Tripoli, after which many of the pilgrims attacked him, cut off his beard, and nearly killed him. After the Hajj, Ali Pasha returned to Egypt and stayed as Murad Bey's guest for several years until the arrival of the French in 1798. He fought with the Mamluk emirs against the French and escaped with them to southern Egypt during the French rule. He then returned to Constantinople, the Ottoman capital. After hearing about the overthrow of the governor Koca Hüsrev Mehmed Pasha in 1803, Ali Pasha asked to be made the governor of Egypt, even though it appeared as though the Albanian troops had taken control of the province from the Ottomans. Thus, in June 1803, he became a vizier and was appointed the Ottoman governor of Egypt.
Governorship of Egypt
At the time that Ali Pasha was appointed governor in 1803, Egypt had come under the rule and influence of Ottoman Albanian troops originally sent by the Ottoman sultan in 1801 to fight against the French invasion of Ottoman Egypt under Napoleon, which had occurred in 1798. Although successful in ousting the French with significant help from the British, the Albanian troops, led by Muhammad Ali, chose to remain in Egypt and gain influence for themselves. Playing both long-warring factions in Egypt against each other, the Albanians gained power. The Ottoman sultan Selim III instructed Ali Pasha to oust the Albanians and the Mamluks and take back Ottoman control of the province. When Ali Pasha arrived in Egypt in July 1803, he found that the Mamluk emir Ibrahim Bey was ruling it as kaymakam, although real power lay with Muhammad Ali. Ibrahim Bey was also the lifelong career partner of Ali Pasha's friend Murad Bey, with whom he made up the duumvirate that held effective rule over Egypt for decades. Muhammad Ali refused to recognize Ali Pasha's governorship, and thus, Ali Pasha governed from Alexandria in the north while Ibrahim Bey governed from Cairo, the capital, in the south. Muhammad Ali and his Mamluk ally, Al-Bardisi, therefore descended on Rosetta, which had fallen into the hands of Ali Pasha's brother, al-Sayyid Ali.The town and its commander were successfully captured by Al-Bardisi, who then proposed to proceed against Alexandria; his troops, however, demanded back-pay which he was unable to provide. During this delay, Ali Pasha destroyed the dykes between the lakes of Aboukir and Mareotis, creating a moat around Alexandria. Unable to proceed with operations against Alexandria, Al-Bardisi and Muhammad Ali returned to Cairo. The troubles of Egypt were exacerbated by an insufficient flood of the Nile, resulting in great scarcity, aggravated by the onerous taxation the Mamluk beys were forced to resort to in order to pay their troops. Riots and violence continued in the capital, with the bashi-bazouks under little or no control. Meanwhile, Ali Pasha had been behaving with brutality towards the French in Alexandria. He received written instructions from the Ottoman sultan, which, in an effort to sow dissension and mistrust between Muhammad Ali Pasha and his Mamluk allies, he sent to Cairo and caused to be circulated there. The Ottoman sultan announced that the Mamluk beys could live peaceably in Egypt with annual pensions and other privileges, provided the government returned to the hands of the Turkish governor. To this, many of the beys assented, and in the process opened a rift with Muhammad Ali and the Albanians. The Mamluks had already been suspicious of their Albanian allies, having previously intercepted letters addressed to them from Ali Pasha, endeavoring to win their alliance as well. Ali Pasha advanced towards Cairo with 3,000 men to discuss his resumption of control. The forces of the beys still with Muhammad Ali Pasha and their Albanian allies advanced to meet Ali Pasha at Shalakan, forcing the Ottoman governor to fall back on a place called Zufayta. At this point, the Albanians managed to seize Ali Pasha's transport boats, capturing soldiers, servants, ammunition, and baggage. They then demanded to know why he had brought such a large host with him, contrary to both custom and a prior warning to not do so. Finding his advance blocked, reluctant to retreat with his forces to Alexandria, and being surrounded by the enemy in any case, Ali Pasha attempted to give battle, but his men refused to fight. He therefore abandoned his troops and went over to the camp of the Mamluk beys. His army was eventually allowed to retire to Syria.
Death
With Ali Pasha in the hands of the beys, a horseman was seen to leave his tent one night at full gallop, and it was discovered that he bore a letter to a forbidden destination. This gave the Mamluks a welcome pretext to rid themselves of him. Ali Pasha was sent under an escort and guard of 45 troops towards the Syrian frontier; about a week later on February 2, news was received in Cairo that during a skirmish with some of his own soldiers, he had died.