Murad IV was replaced by his younger brother, Ibrahim Han (1640-1648). The years of his sultanate were called as Sable Period. The first half his sultanate was just like the continuation of his elder brother. However, in the second half of his sultanate, the public order and peace were discontinued and the anarchy re-emerged. In the period of this ruler, a great and a long lasting Venetian war broke out. The Ottoman Imperial Navy set in motion from Istanbul (30th April 1645). It started to land a large Turkish army into the Crete Island (in the morging of 24th June). Hanya was conquered (22nd August). Resmo was also captured and the blockade of Kandiye was started (7th July 1647). The Venetian navy was overwhelmed in Ipsala (9th March 1648). However, Kandiye could not be captured at all. Venetian Repulic that provided a great deal of supports from the entire Europe showed a firm determination and did not give the delivery of the castle of Kandiye. The unbelievable sacrifices and losses of both sides dragged on during the war. Venetian was determined not to lose their last base in the Aegean and Mediterranean Seas.

Sultan Ibrahim was dethroned through a revolution and his elder brother, Osman II was killed. Then, the sultanate of his elder son, Mehmed IV started (1648-1687). However, since the new ruler was 6.5 years old, the power was under dominion of various persons. Firstly, Kösem Mahpeyker Büyük Valide Sultan (Great Mother Sultan) became the regent of the sultanate. She was the mother of Murad IV and Ibrahim Han and the grandmother of Mehmed IV. She was the most famous woman of the Turkish history. However, this reputation was not a positive fame. She was intelligent, but also covetous in the same degree. The period of her regency for the sultanate (1648-1651) that lasted for 3 years was called as the Sultanate of Ağalar (Chiefs). Actually, the real power was under the dominion of Janissary chiefs that were called “Ağalar”. Kösem Sultan shared the power with these chief commanders. The period was the period of corruption, bribery and anarchy. Kösem Sultan was killed. Then, her daughter-in-law, Hadice Tarhan Valide Sultan who was the mother of Mehmed IV replaced her as the regent of the sultanate. She was not a woman like her mother-in-law who could do anything for her interests and cravings who only thought of herself. She was a highly modest and a wise young woman who fussed over the state. When she became the regent of the world state, she was 24 years old. She was supported by the statesmen who had perceived that the state was approaching to a tragic end. When Kösem Sultan was annihilated, 38 chiefs who had collaborated with her and despoiled the state were executed.

Tarhan Sultan defended the high interests of the state with her intelligent estimations for the equilibrium and she looked for the proper statesmen. She changed 10 grand viziers. Any of them did not show the proper faith in the state that was expected from them. Finally, upon the recommendation of her counsellors, she delivered the Imperial Seal to Köprülü Mehmed Pasha who was an old and unknown vizier with an anxiety and without any significant hope from him (15th September 1656). She had entitled the proper authorities to him that he had demanded and she reigned from regency in a state of dignity and honour. She was 29 years old and her son, Mehmed IV was then at the age of 15. However, he was just like Selim II who did not want to intervene in the state affairs. Therefore, all the authorities were gathered under the domination of Köprülü Mehmed Pasha. Thus, the period of Köprülü family was started that would last for 27 years until the year of 1683. According to some historians, it was a period of glory and honour that even could be compared with the period of Kanuni.

The teacher of the Old Köprülü was Murad IV. He tried to imitate that ruler and he imitated him as much the same with all his oppression that he had imposed before. He had shed blood. However, he eradicated the problem of anarchy. He went to Erdel and extirpated the anarchy in this region. Then, he advanced towards the Bandits in the Anatolia. The Crimean Khan Mehmed Giray had won the victory of Konotop in the west of Cernigov with a distance of 150 km that was located in the east of Priper marshes (12th March 1659). 120.000 Russian soldiers had died in the battlefield and 50.000 Russians were taken prisoners by the Turks. The chief commander, Prince Trubeçkoy and all his retinues were among the dead.

In the last days of the power of Köprülü that lasted for 5 years, a fire broke out in Istanbul that was the greatest fire in the history (25th July 1660). 8.000 houses, 300 palaces, 360 mosques and small mosques, 100 trade inns, 40 public baths and various buildings in the city got burnt. 4.000 people were burnt in this fire and they either died or got injured. In the place of Köprülü, his son, Köprülüzade Fazıl Ahmed Pasha became the grand vizier at the age of 27 and with all the same authorities and powers (30th October 1661).

Pursuant to a state of peace for 56.5 years, the state of war was declared against Germany (12th April 1663). Uyvar was conquered (24th September). Köprülüzade who organised the second military expedition to Germany overwhelmed the Germans in Serinvar (5th June 1664). However, he could not defeat the Germans in Saint-Gotar (1st August). The Vasvar Agreement (10th August 1664) that provided great advantages for Turkey gave an end to the Turkish-German War. Köprülüzade decided to finalise the affair of Crete and he passed to the island. He stayed in Crete Island for 3 years. Finally, Kandiye was conquered (27th September 1669). The Venetian War ended up and then, the war with Poland broke out. Mehmed IV organised his second military expedition to Poland (1672-1673). In the first military expedition, Kamaniçe was conquered, and then, Poland and Galicia were also conquered. Therefore, the borders were extended far ahead towards the north. Upon the Bucaş Agreement (18th October 1672), Poland acknowledged this Turkish conquest. However, since it did not act in compliance with the contractual conditions, the military expedition was repeated in the following year. The Zorawno Agreement (27th October 1676) gave an end to the Turkish-Polish War and it approved the Bucaş Agreement with all its conditions. Poland was totally overwhelmed under unnecessary conditions and a temporary hostility against the Turks that was not based on geopolitical reasons came into existence in this country.

Köprülüzade Fazıl Ahmed Pasha died at the age of 41 (at night of 2nd/3rd November 1676). Since most of his life was passed in the fronts, his peer and his sister’s husband, Kara Mustafa Pasha had been the head official (deputy grand vizier) in his place for long years. Therefore, Kara Mustafa Pasha became the grand vizier (1676-1683). The grand viziership of Köprülüzade that had lasted for 15.5 years has been one of the most long-lasting periods of government in the history of Turkey. Besides, this period included the most fortunate years in various aspects in the Turkish history. This glory had reached to its peak level in the period of Merzifonlu.

The first great Ottoman-Russian War took place in the year of 1677. Until that period, Russia had always been a state of secondary class for Turkey. It was an ordinary subject state of the Crimean Khan. Mehmed IV organised his second military expedition towards Russia (1678-1680). Edirne Agreement (11th February 1681) gave an end to this war. The Ottoman State had acquired new advantages. The problem resulted from the intervention of Russians to Ukraine that had been under the Ottoman protection.

The state of peace with Germany that lasted for 19 years was destroyed upon the intervention of the German Empire into the Ottoman lands that are now within the borders of Czechoslovakia. Mehmed Iv set in motion from Edirne towards Germany (1st April 1683). However, he stayed in Belgrade. The army continued its movement under the command of the Grand Vizier and the Chief Commander, Merzifonlu Kara Mustafa Pasha. Mustafa Pasha started to besiege Vienna, the capital city of the German empire after 154 years pursuant to the its blockade by Kanuni (14th July 1683). He was very self-confident; but he made several strategical and technical faults. The entire Europe rebelled and took side with Germany. While a large Crusade army was approaching to Vienna, the Crimean Khan Mehmed Giray Khan made way for this army of the enemy since he was insulted by the Grand Vizier and he did not even shoot once against the enemy. A great pitched battle took place in Kahlenberg in the places in front of Vienna that was called as Alamandağı (German Mountain) by the Turks (12th September 1683). In this pitched battle, a terrible defeat was experienced due to the treachery of the Vizier Damat Ibrahim Pasha who commanded the right wing of the Turkish army. Vienna was saved in the evening at the hour of 7 and the gongs for thanksgiving chattered loudly in all of the European churches. When the Chief Commander came to Budin (Budapest) (22nd September), the Vizier Kara Mehmed Pasha defeated the Polish King, Sobiesky who was the chief commander of the allied forces in Cigerdelen pitched battle –within the lands of today’s Czechoslovakia- (7th October). However, he had few and insufficient forces. Therefore, he was defeated in the second Cigerdelen battle (9th October) and Estergon was lost (1st November).

Mehmed IV who was deceived by the propaganda of his enemies dismissed the grand vizier (15th December). Merzifonlu was executed in Belgrade (25th December 1683). This was a terrible calamity. In the year of 1656, a new period started that resembled to the former periods that took place before the assignation of Köprülü Mehmed Pasha who was Merzifonlu’s father-in-law and the stepfather. A suitable vizier could not be found at all. Various inefficient fellows followed each other. Meanwhile, the death of Tarhan Valide Sultan had deprived Mehmed IV of his best and unbiased counsellor who was not a sycophant and who always told the truth as a friend of the state.

In the Sprig of 1683, Turkey entered into a period of retreat, decline and collapse that would last for two and a half century. On the occasion of the blockade of Vienna, it encountered the united forces of Europe for once more. However, it would not defeat the united forces of Europe and it would be defeated for the first time in its history. Despite this fact, it had a power to experience the period of impasse for another 90 years. Considering that the state of Spain that had been just like the Ottoman Empire of the Europe was abolished with a dazzling pace toppling over its nose, it can be revealed that the Ottoman-Turkish decline took place at a fairly lower pace. This was doubtlessly based on the fact that the foundation of the Turkish world empire had been laid in a sound and robust manner. This superiority of the West would not take place before the transition of a period of nearly a century. However, the West had arranged all its reasons for its superiority. It had attained all the facilities and opportunities or it was on the verge of the accomplishment of this situation. Particularly through the establishment of the dominion in the Oceans, it had possessed various significant values that were not yet perceived by the East. The East still benefited from its very glorious inheritance. This inheritance would be used up in a short period.