The rebels were decisively defeated by a Habsburg army under Field marshal Sigbert Heister, backed by Rascian forces, in the 1708 Battle of Trencsén.
As the conflict rumbled on, the Hofkriegsrat president Prince Eugene of Savoy appointed the loyal Hungarian Field Marshal János Pálffy chief negotiator.
On 17 April, the Habsburg Emperor Joseph I died and was succeeded by his brother Charles VI, who had a vital interest in the cessation of military action in order to obtain the Hungarian crown.
Based on the terms of the accord, Emperor Charles promised to maintain the integrity of both Transylvanian and Hungarian estates.
The impact of the treaty was evident on 1 May 1711, when 12,000 former advocates of Rákóczi swore allegiance to the House of Habsburg in the fields outside of Majtény in Szatmár.