Mehmed IV (; ; 2 January 1642 – 6 January 1693), also known as Mehmed the Hunter (), was the sultan of the Ottoman Empire from 1648 to 1687. He came to the throne at the age of six after his father was overthrown in a coup. Mehmed went on to become the second-longest-reigning sultan in Ottoman history after Suleiman the Magnificent. While the initial and final years of his reign were characterized by military defeat and political instability, during his middle years he oversaw the revival of the empire's fortunes associated with the Köprülü era. Mehmed IV was known by contemporaries as a particularly pious ruler, and was referred to as gazi, or "holy warrior" for his role in the many conquests carried out during his long reign.

Under Mehmed IV's reign, the empire reached the height of its territorial expansion in Europe. From a young age he developed a keen interest in hunting, for which he is known as avcı (translated as "the Hunter"). In 1687, Mehmed was overthrown by soldiers disenchanted by the course of the ongoing War of the Holy League. He subsequently retired to Edirne, where he resided and died of natural causes in 1693.

Mehmed IV

Early life

Born at Topkapı Palace, Constantinople, in 1642, Mehmed was the son of Sultan Ibrahim (r. 1640–48) by Turhan Sultan, a concubine of Russian origin, and the grandson of Kösem Sultan of Greek origin. Soon after his birth, his father and mother quarrelled, and Ibrahim was so enraged that he tore Mehmed from his mother's arms and flung the infant into a cistern. Mehmed was rescued by the harem servants. However, this left Mehmed with a lifelong scar on his head.

Mehmed IV

Reign

Accession

Mehmed ascended to the throne in 1648 at the age of six, during a very volatile time for the Ottoman dynasty. On 21 October 1649, Mehmed along with his brothers Suleiman and Ahmed were circumcised.

Mehmed IV

Kösem Sultan, Mehmed's grandmother and regent, was suspected of supporting the rebels and plotting to poison the sultan and replace him with his younger half-brother, Suleiman. As a result, Mehmed agreed to sign his grandmother's death warrant in September 1651.

The empire faced palace intrigues as well as uprisings in Anatolia, the defeat of the Ottoman navy by the Venetians outside the Dardanelles, and food shortages leading to riots in Constantinople. It was under these circumstances that Mehmed's mother granted Köprülü Mehmed Pasha full executive powers as Grand Vizier. Köprülü took office on 14 September 1656. Mehmed IV presided over the Köprülü era, an exceptionally stable period of Ottoman history. Mehmed is known as Avcı, "the Hunter", as this outdoor exercise took up much of his time.

Wars

Mehmed's reign is notable for a revival of Ottoman fortunes led by the Grand Vizier Köprülü Mehmed and his son Fazıl Ahmed. They regained the Aegean islands from Venice, and Crete, during the Cretan War (1645–1669). They also fought successful campaigns against Transylvania (1660) and Poland (1670–1674). When Mehmed IV accepted the vassalage of Petro Doroshenko, Ottoman rule extended into Podolia and Right-bank Ukraine. This event would lead the Ottomans into the Russo-Turkish War (1676–1681). His next vizier, Köprülü Mehmed's adopted son Merzifonlu Kara Mustafa, led campaigns against Russia, besieging Chyhyryn in 1678 with 70,000 men. He next supported the 1683 Hungarian uprising of Imre Thököly against Austrian rule, marching a vast army through Hungary and besieged Vienna. At the Battle of Vienna on the Kahlenberg Heights, the Ottomans suffered a catastrophic rout by Polish-Lithuanian forces famously led by King John III Sobieski (1674–1696), and his allies, notably the Imperial army.

In 1672 and 1673, the sultan, who embarked on two Polish-Lithuanian campaigns with serdar-ı ekrem and Grand Vizier Fazıl Ahmed Pasha, and the acquisition of the Kamaniçi Castle, returned to Edirne after the signing of the Bucaş Treaty.

Fire of 1660

The fire of 4–5 July 1660 was the worst conflagration Constantinople had experienced to that date. It started in Eminönü and spread to most of the historic peninsula, burning much of the city. Even the minarets of Suleiman I's mosque burned. Two-thirds of Istanbul was turned to ash in the conflagration, and as many as forty thousand people were killed. Thousands died in the famine and plague which followed the fire. Following the fire, the dynasty expelled Jews from a wide swath of Istanbul, confiscated their synagogues and homes so that in their place the Yeni Cami (New Mosque) and the Spice Bazaar (Egyptian Market) could be built.