 Before long, Johann Tserclaes, Count of Tilly, who was the commander of the army of the Catholic League, occupied Upper Austria, Bucquoy defeated the last rebels in Lower Austria and John George of Saxony invaded Lusatia.Maximilian I retained Upper Austria as a security for Ferdinand's debts and the local Estates swore fealty to him on 20 August.The Diet of Hungary dethroned Ferdinand and elected Bethlen king on 23 August.