Victory of Holy Roman Empire Rákóczi's War of Independence (1703–1711) was the first significant attempt to topple the rule of the Habsburgs over Hungary.However, relations between the court and the nobility were deteriorating, and the new Habsburg rulers treated the peasants so poorly that eventually some people wished for a return to Turkish rule.With the help of King Louis XIV of France, anti-Habsburg rebels, led by young nobleman Imre Thököly, rose against the Empire in 1678.After Thököly was defeated, Zrínyi held the castle of Munkács (today Mukacheve in Ukraine) for three years but was eventually forced to surrender.Remnants of Thököly's peasant army started a new uprising in the Hegyalja region of northeastern present-day Hungary, which was part of the property of the Rákóczi family.They captured the castles of Tokaj, Sárospatak and Sátoraljaújhely, and asked Rákóczi to become their leader, but he was not eager to head what appeared to be a minor peasant rebellion.Rákóczi then befriended Count Miklós Bercsényi, who was married to Krisztina Csáky, and whose property at Ungvár (today Ужгород (Uzhhorod), in Ukraine), lay next to his own.Three years later, the War of the Spanish Succession caused a large part of the Austrian forces in the Kingdom of Hungary to temporarily leave the country.On 15 June 1703, another group of about 3000 armed men headed by Tamás Esze joined him near the Polish city of Lawoczne (today Lavochne, a village in Ukraine).In 1706, his wife (whom he had not seen in 5 years, along with their sons József and György) and his sister were both sent as peace ambassadors, but Rákóczi rejected their efforts on behalf of the Emperor.On Rákóczi's recommendation, and with Bercsényi's support, another meeting of the Diet held at Ónod (Borsod County) declared the deposition of the House of Habsburg from the Hungarian throne on 13 June 1707.At the Battle of Trenčín (Hungarian Trencsén, German Trentschin, Latin Trentsinium, Comitatus Trentsiniensis, today in Slovakia), on 3 August 1708 Rákóczi's horse stumbled, and he fell to the ground, which knocked him unconscious.Not trusting the word of János Pálffy, who was the Emperor's envoy charged with negotiations with the rebels, the Prince left the Kingdom of Hungary for Poland on 21 February 1711.Although Austrian General Rabutin lost in Transylvania, he retreated into the Saxonland, where Saxon towns and peasants gave shelter to the Habsburg Army.
Kuruc preparing to attack traveling coach and riders, c. 1705