Career
After the Edirne event, sultan Ahmed III appointed him as the beylerbey (high governor) of Aleppo (modern Syria) and later as the beylerbey of Tripoli (modern Lebanon). In 1706, he was appointed as grand vizier. These fortunate events came to an end, however, when Charles XII of Sweden sought refuge in Ottoman lands after his defeat at the Battle of Poltava.
Peter I of Russia tried to follow him into Ottoman lands, and Charles persuaded the Ottoman government to declare war on Russia.
Ali Pasha wasn"t able to follow a consistent policy, and the Swedish ambassador accused him of accepting bribes from the Russians. On 15 June 1710, he was dismissed and appointed as the governor of Feodosiya (in modern Ukraine).
But before he was able to reach his new office, the sultan changed his mind and exiled Ali Pasha to the island of Lesbos (in modern Greece), where he was then executed.