Six years later, while he was serving as the governor of Erzurum Eyalet, he was reappointed as the grand vizier on 20 February 1781. His main task was reforming the army which was unsuccessful in the war. But in this task he failed to satisfy the sultan, and furthermore, a fire in Istanbul caused great damage and riots, leading to his dismissal by the sultan on 25 August 1782 and exile to Plovdiv.[1][2][4]