On November 2, 1705, János Bottyán actuated the Hungarian campaign in Transdanubia. Before that he had only 8,000 soldiers at Kecskemét but this number later increased to 30,000 men.
On December 10, Kőszeg capitulated and Bottyán moved to Szentgotthárd, where Heister was. The Kuruc Army between Mogersdorf and Szentgotthárd attacked the Austrians (the Habsburg troops was also consisted of several Croatian and Serbian corps).
After the battle Heister headed for Stadtschlaining(Szalonak) and the Dunántúl was freed.