Gavasini resigned from the army in 1806, but was recalled up to service before the outbreak of the War of the Fifth Coalition. At the beginning of the conflict he commanded a brigade of Landwehr that comprised two battalions from Trieste, two battalions from Gorizia (Görz), and four battalions from Postojna (Adelsberg). After the eruption of the Tyrolean Rebellion, the Austrian high command dispatched Johann Gabriel Chasteler de Courcelles and a division to the aid of the rebels. In the consequent reorganization of Archduke John of Austria's Army of Inner Austria, Gavasini emerged as brigade commander in the IX Armeekorps of Ignaz Gyulai. His brigade was made up of three battalions of the "Reisky" Infantry Regiment N. 13 and one and one-half battalions of the "Otocaner" Grenz Infantry Regiment Nr. 2. He led this unit at the Battle of Sacile on 16 April 1809. The VIII Armeekorps of Albert Gyulai absorbed the main attack of Eugène de Beauharnais' army while the IX Armeekorps waited in reserve. In the afternoon, Archduke John unleashed Ignaz Gyulai's troops and they pressed back the outmatched Franco-Italian left flank to win the contest.