Rákóczi uprising
As the House of Habsburg was on the verge of dying out in Spain, France was looking for allies in its fight against Austrian hegemony. Consequently, they established contact with Rákóczi and promised support if he took up the cause of Hungarian independence. An Austrian spy seized this correspondence and brought it to the attention of the Emperor. As a direct result of this, Rákóczi was arrested on 18 April 1700, and imprisoned in the fortress of Wiener Neustadt (south of Vienna). It became obvious during the preliminary hearings that, just as in the case of his grandfather Péter Zrínyi, the only possible sentence for Ferenc was death. With the aid of his pregnant wife Amelia and the prison commander, Rákóczi managed to escape and flee to Poland. Here he met with Bercsényi again, and together they resumed contact with the French court.
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. Taking advantage of the situation, Kuruc forces began a new uprising in Munkács, and Rákóczi was asked to head it. He decided to invest his energies in a war of national liberation, and accepted the request. On 15 June 1703, another group of about 3000 armed men headed by Tamás Esze joined him near the Polish city of Ławoczne. Bercsényi arrived too, with French funds and 600 Polish mercenaries.
Most of the Hungarian nobility did not support Rákóczi's uprising, because they considered it to be no more than a peasant rebellion. Rákóczi's famous call to the nobility of Szabolcs County seemed to be in vain. He did manage to convince the Hajduk (Hungarian soldiers) (emancipated peasant warriors) to join his forces, so his forces controlled most of Kingdom of Hungary to the east and north of the Danube by late September 1703. He continued by conquering Transdanubia soon after.
Since the Austrians had to fight Rákóczi on several fronts, they felt obliged to enter negotiations with him. However, the victory of Austrian and British forces against a combined French-Bavarian army in the Battle of Blenheim on 13 August 1704, provided an advantage not only in the War of the Spanish Succession, but also prevented the union of Rákóczi's forces with their French-Bavarian allies.
This placed Rákóczi into a difficult military and financial situation. French support gradually diminished, and a larger army was needed to occupy the already-won land. Meanwhile, supplying the current army with arms and food was beyond his means. He tried to solve this problem by creating a new copper-based coinage, which was not easily accepted in Hungary as people were used to silver coins. Nevertheless, Rákóczi managed to maintain his military advantage for a while – but after 1706, his army was forced into retreat.
A meeting of the Hungarian Diet (consisting of 6 bishops, 36 aristocrats and about 1000 representatives of the lower nobility of 25 counties), held near Szécsény (Nógrád County) in September 1705, elected Rákóczi to be the "vezérlő fejedelem" – (ruling) prince – of the Confederated Estates of the Kingdom of Hungary, to be assisted by a 24-member Senate. Rákóczi and the Senate were assigned joint responsibility for the conduct of foreign affairs, including peace talks.
Encouraged by England and the Netherlands, peace talks started again on 27 October 1705 between the Hungarians and the Emperor. Both sides varied their strategy according to the military situation. One stumbling block was the sovereignty over Transylvania – neither side was prepared to give it up. Rákóczi's proposed treaty with the French was stalled, so he became convinced that only a declaration of independence would make it acceptable for various powers to negotiate with him. 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.
In 1707 during the Great Northern War he was one of the candidates to the throne of Poland, supported by Elżbieta Sieniawska.
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. But neither this act, nor the copper currency issued to avoid monetary inflation, were successful. Louis XIV refused to enter into treaties with Prince Rákóczi, leaving the Hungarians without allies. There remained the possibility of an alliance with Imperial Russia, but this did not materialize either.
At the Battle of Trencsén (German: Trentschin, Latin: Trentsinium, Comitatus Trentsiniensis, today Trenčín in Slovakia), on 3 August 1708 Rákóczi's horse stumbled, and he fell to the ground, which knocked him unconscious. The Kuruc forces thought him dead and fled. This defeat was fatal for the uprising. Numerous Kuruc leaders transferred their allegiance to the Emperor, hoping for clemency. Rákóczi's forces became restricted to the area around Munkács and Szabolcs County. 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.