from 1665 Austria was finally reunited under one archduchy. Leopold I (1657–1705): Final unification and liberation from Ottoman Empire Leopold I's reign was marked by a return to a succession of wars. Even before he succeeded his father in 1657, he was involved in the Second Northern War (1655–1660) a carry over from Sweden's involvement in the Thirty Years' War, in which Austria sided with Poland, defeating Transylvania, a Swedish ally and Ottoman protectorate. At the end of that war the Ottomans overran Nagyvárad in Transylvania in 1660, which would mark the beginning of the decline of that principality and increasing Habsburg influence. In vain the Transylvanians appealed to Vienna for help, unaware of secret Ottoman-Habsburg agreements. Fortunately for Austria, Turkey was preoccupied elsewhere during the Thirty Years' War when she would have been vulnerable to attack on her eastern flanks. It was not until 1663 that the Turks developed serious intentions with regard to Austria, which let to a disastrous event for the Ottoman army, being defeated at the Battle of Saint Gotthard the following year. The terms, dictated by the need to deal with the French in the west, were so disadvantageous that they infuriated the Hungarians who revolted. To make matters worse, after executing the leaders, Leopold attempted to impose a counter-reformation, starting a religious civil war, although he made some concessions in 1681. Thus by the early 1680s Leopold was facing Hungarian revolt, backed by the Ottomans and encouraged by the French on the opposite flank. Meanwhile, Austria became involved elsewhere with the Franco-Dutch War (1672–1678) which was concluded with the Treaties of Nijmegen giving the French considerable opportunities (reunions), indeed the activities of the French, now also a major power, distracted Leopold from following up his advantage with the Turks, and Austro-Ottoman relationships were governed by the Peace of Vasvár which would grant some twenty years relief. However the reunions bought a badly needed French neutrality while Austria kept watch to the east. The Ottomans next moved against Austria in 1682 in retaliation against Habsburg raids, reaching Vienna in 1683, which proved well fortified, and set about besieging it. The allied forces eventually proved superior and the lifting of the siege was followed by a series of victories in 1686, 1687 and 1697, resulting in the Treaty of Karlowitz (1699), Belgrade having fallen in 1688 (but recaptured in 1690). This provided Austrian hegemony over southern