Upon Russia declaring war against Turkey in 1853, he was appointed commander-in-chief of the troops which occupied Moldavia and Wallachia.
Meanwhile the empire seemed in danger of breaking up. Not till 1812 was the war with Russia closed by the treaty of Bucharest, which restored Moldavia and the greater part of Wallachia to the Ottoman government.
A little later (January 1657) he suppressed with ruthless severity a rising of the spahis; a certain Sheik Salim, leader of the fanatical mob of the capital, was drowned in the Bosporus; and the Greek Patriarch, who had written to the voivode of Wallachia to announce the approaching downfall of Islam, was hanged.
Austria was to have Bosnia, Wallachia and Ragusa.
In spite of his victories he was again deposed in February 1595, shortly after the accession of Mahommed III., and banished to Malghara; but in August was in power again and on the march to Wallachia.