Treaty of Karlowitz
The Treaty of Karlowitz was signed on 26 January 1699 in Sremski Karlovci, in modern-day Serbia, concluding the Great Turkish War of 1683–1697 in which the Ottoman Empire had been defeated at the Battle of Zenta by the Holy League. It marks the end of Ottoman control in much of Central Europe, with their first major territorial losses after centuries of expansion, and established the Habsburg Monarchy as the dominant power in the region.
Treaty of Karlowitz
Following a two-month congress between the Ottoman Empire on one side and the Holy League of 1684, a coalition of the Holy Roman Empire, the Polish–Lithuanian Commonwealth, the Republic of Venice and Peter the Great, Tsar of Russia, a treaty was signed on 26 January 1699.
Transformation of the Ottoman Empire
The Transformation of the Ottoman Empire, also known as the Era of Transformation, constitutes a period in the history of the Ottoman Empire from  1550 to  1700 , spanning roughly from the end of the reign of Suleiman the Magnificent to the Treaty of Karlowitz at the conclusion of the War of the Holy League. This period was characterized by numerous dramatic political, social, and economic changes, which resulted in the empire shifting from an expansionist, patrimonial state into a bureaucratic empire based on an ideology of upholding justice and acting as the protector of Sunni Islam. These changes were in large part prompted by a series of political and economic crises in the late sixteenth and early seventeenth centuries, resulting from inflation, warfare, and political factionalism. Yet despite these crises the empire remained strong both politically and economically, and continued to adapt to the challenges of a changing world. The seventeenth century was once characterized as a period of decline for the Ottomans, but since the 1980s historians of the Ottoman Empire have increasingly rejected that characterization, identifying it instead as a period of crisis, adaptation, and transformation.
Transformation of the Ottoman Empire
In the second half of the sixteenth century the empire came under increasing economic pressure due to rising inflation, which was then impacting both Europe and the Middle East. Demographic pressure in Anatolia contributed to the formation of bandit gangs, which by the 1590s coalesced under local warlords to launch a series of conflicts known as the Celali rebellions. Ottoman fiscal insolvency and local rebellion together with the need to compete militarily against their imperial rivals the Habsburgs and Safavids created a severe crisis. The Ottomans thus transformed many of the institutions which had previously defined the empire, gradually disestablishing the Timar System in order to raise modern armies of musketeers, and quadrupling the size of the bureaucracy in order to facilitate more efficient collection of revenues. In Istanbul, changes in the nature of dynastic politics led to the abandonment of the Ottoman tradition of royal fratricide, and to a governmental system that relied much less upon the personal authority of the sultan. Other figures came to play larger roles in government, particularly the women of the imperial harem, for which much of this period is often referred to as the Sultanate of Women.

Question: Which war was ended with the Ottoman's defeat at the Battle of Zenta?
Answer: War of the Holy League