Leopold I, 1640–1705, Holy Roman emperor (1658–1705), king of Bohemia (1656–1705) and of Hungary (1655–1705), second son and successor of Ferdinand III. Upon his elder brother's death (1654), Leopold, who had been educated for the church, became Ferdinand's heir. During his reign the Holy Roman Empire was menaced by the Ottoman Empire (Turkey) in the east and by King Louis XIV of France in the west. The Turkish invasions of Hungary were temporarily checked by the imperial commander Montecucculi, but by the Treaty of Vasvar (1664) the Turks kept their conquests and their suzerainty over Transylvania. In the west, Leopold joined the anti-French coalition in the third (1672–78) of the Dutch Wars. A revolt in Hungary against Hapsburg rule reopened war with the Ottomans, who supported the rebel leader Thököly. The Turks besieged Vienna (1683), which Leopold saved with the aid of King John III of Poland and the imperial general Charles V of Lorraine. Other victories followed. However, Leopold's attempts to stop French aggression divided his energies and postponed the successful conclusion of war with the Turks. In 1686 he formed a defensive alliance against France known as the League of Augsburg. In 1688, Louis XIV invaded the Palatinate and war broke out (see Grand Alliance, War of the). The Treaty of Ryswick with Louis XIV temporarily halted French expansion. In the east the triumph of Eugene of Savoy over the Turks at Zenta (1697) led to the Treaty of Karlowitz by which Leopold obtained nearly all of Hungary. War with France over the succession to the Spanish throne ensued in 1701 (see Spanish Succession, War of the). After Leopold's death the war continued under Joseph I, his son and successor. During Leopold's reign Vienna became a cultural center. His particular interest was music, and he was a fair composer.