In the second Battle of Bergisel, from May 25 to May 29, 1809, Hofer's troops again defeated the Bavarians, driving them out of the country and retaking 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. However, Napoleon again defeated Austrian troops in the Battle of Wagram on July 6. The Armistice of Znaim ceded Tyrol to Bavaria again. Napoleon sent 40,000 French and Bavarian troops to take over Tyrol and they re-occupied Innsbruck.