Hofer became the effective commander-in-chief of the Tyrolean rebels, with the support of other leaders like Josef Speckbacker and Father Joachim Haspinger. He commanded a force of Tyroleans approximately 20,000 strong, together with a couple of hundred Austrian soldiers who had joined them after the retreat of the Austrian army.
In
Iselberg on May 25 and May 29 Hofer's troops again defeated the Bavarians and drove them out of the country. Hofer's troops retook Innsbruck on May 30.
On May 29 Hofer received a letter from Emperor Francis in which he promised not to sign any peace treaty that would include giving up Tyrol. An Austrian
intendant came to rule Tyrol and Hofer returned to his home.
Napoleon defeated Austrian troops in the
Battle of Wagram on July 6. On July 12 the
armistice in Znaim ceded Tyrol to Bavaria again. Napoleon sent 40,000 French and Bavarian troops to take over Tyrol and they reoccupied Innsbruck.
After little hesitation, Hofer joined the battle again. The French promised a reward for his head. On August 13-14, his Tyroleans defeated the French troops of Marshal
Lefebvre on
Bergisel in a 12-hour battle after a downhill charge and again retook Innsbruck.
Hofer declared himself Imperial Commandant of the Tyrol in the absence of the ruler and for two months ruled the land from
Hofburg in the name of the Emperor of Austria. He announced new laws and taxes and minted his own coins. He also sent two men to Britain to ask for assistance. On September 29 he received a medal from the emperor and another promise that Austria would not abandon Tyrol.
Hofer's hopes were dashed again on October 14 when the
Treaty of Schönbrunn yet again ceded Tyrol to Bavaria. French and Bavarian troops advanced again and Hofer retreated to the mountains. Promised
amnesty, Hofer and his followers laid down their weapons November 8. Hofer retreated to his home valley.