The alteration of the grand viziers was hindering the empire’s recovering. Meanwhile, everybody wanted to see Koprulu Mehmet Pasha as the grand vizier. He was offered to be the grand vizier but for the first time in the Ottoman history Mehmet Pasha laid down some conditions. First of his conditions was, the palace would be apart from the administration, secondly, if somebody would complained about him, his defence would be asked. Sultan Mehmet IV had accepted these conditions and Koprulu Mehmet Pasha came to be the grand vizier. He was a vigorous old man and he restored the tranquillity.

He restored the financial regulations, he recaptured the island of Limni, Bozcaada and Imros from the Venetians in 1657. He defeated the Russian Army in Konotop (1659) and he repressed the revolt of Erdel Prince Rakochi.

Anatolian Turkish States had liberated during the chaotic condition of the empire. Koprulu Pasha had attacked them, he restored unity violently as Murat IV previously did. He attended grand vizier for five years and he killed approximately 35.000.000 people.

He died in October, 31, 1661. His son, the greatest of all Turkish grand viziers Koprulu Ahmed Pasha held the viziership.

The Ottoman-Austrian War was continuing. Koprulu Ahmed Pasha raided to Austria he captured the castles of Uyvar (September 24, 1663) and Novigrad (November 4, 1663), and Austria wanted an agreement.

With the Vasvar Agreement(August 10, 1664), the Ottomans took the places they were invaded and Austria accepted to pay war compensation.