Although his fellow countryman was executed after the unsuccessful siege of Vienna in 1683, Ali continued to work as a civil servant.
He traveled to Mecca (now in Saudi Arabia) for pilgrimage and gained the title Hacı, and in 1688, he was appointed as governor of the Sanjak of Sakız Island (modern-day Chios, Greece).
Upon returning to Istanbul, the capital, he concentrated on improve the state of the treasury, which was running a deficit due to the costly war.
However, although the treasury was recovered, Ali Pasha soon became the target of severe criticisms and opposition by political rivals because of his policy of economic austerity.
[1] In the absolute monarchical system of the Ottoman Empire, objection to the sultan's order was unheard of.