However, this wasn't an easy task. The current government policy was subjected to the constant intrigues of court rival parties and, as the most devoutly Catholic court in Europe, the spiritual advice was also fundamental. In addition, the tense international situation caused problems to him: just a year after his appointment in July 1683 took place the second Turkish siege of Vienna by Kara Mustafa Pasha; only thanks to the help of the Polish King Jan III Sobieski and Pope Innocent XI the Imperial capital was saved. In the Great Turkish War, the city of Belgrade was sieged and captured in 1688 and all Hungary was freed by the decisive victory of Prince Eugene of Savoy in the Battle of Zenta, who was the base for the Austrian rise as a major power. On the political level, the resistance of the Hungarian nobility against the Habsburg rule was partially ended with the consent for the coronation of Archduke Joseph, Leopold I's eldest son, as King of Hungary in 1687. In the west, however, King Louis XIV of France was a successful threat for the Empire: in 1683 he capture the imperial city of Strasbourg and in 1688 he entered in the Rhineland, after having devastate the Rhenish Palatinate. The war against France (called the Nine Years' War) began, but had little success. By the Peace of Ryswick in 1697 the Spanish Netherlands where ceded to France.