In Tyrol, Andreas Hofer led a rebellion against Bavarian rule and French domination that resulted in early isolated victories in the first Battles of Bergisel. Hofer freed the Tyrol of Bavarian occupation by late August but on 29 September an Italian force under Luigi Gaspare Peyri captured Trento, though they could advance no further. The next month, with troops made available after the Treaty of Schönbrunn, a Bavarian force under Jean-Baptiste Drouet, Comte d'Erlon travelled to end the rebellion. Supported by Franco-Italian forces, a three-pronged attack occupied the region with 45,000 troops by early November. Hofer went into hiding but was betrayed by one of his men in January 1810 and executed by the French.